Java – does hibernate / JPA consider transiant modifiers (not annotations)

I want to avoid serialization (in JMS / AMF), but still use JPA / hibernate to hold fields

Is the transient modifier my friend@ Are transient annotations and transient modifiers relevant?

The Java specification precisely states that transient fields are not stored in persistent storage by system services But is hibernate a system service? (I don't think so) http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#78119

And Java io. Serializable seam indicates that out. Is called Writeobject and in Serialize readObject http://download.oracle.com/javase/1.4.2/docs/api/java/io/Serializable.html

Any insights?

Maybe I should write a quick test, but I will be more confident in a specification

thank you!

Solution

They are not really related, but I'm afraid they won't be your friends and Hibernate / JPA won't keep transient properties JPA specifications are as follows:

reference resources

>JPA 1.0 specification

>Section 2.1 Section 1 persistent fields

>Hibernate core reference guide

> 2.2. 2. Mapping simple properties

Related issues

> Why does JPA have a @Transient annotation?

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>