openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jasmin Riemer <>
Subject Serialization with @Transient fields
Date Tue, 07 Jul 2009 20:40:31 GMT
Hello everybody,

I have created an entity having attributes which should be
persisted and attriutes which should not be persisted marked with the
@Transient annotation. For example it is something like this:

public class MyEntity implements Serializable
    protected int myInteger;
    protected List myList;

    // And so on

I need the transient field for holding some content during the 
application which
needs not to be persisted.
Now I want to serialize MyEntity, but there is the problem: All fields 
with @Transient are not serialized. I know there is the "transient" 
modifier which
excludes attributes from serialization, but has @Transient the same effect?

How can I make the application serializing @Transient fields without 
having to persist them?
Has anyone an idea?


  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message