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:
@Entity
public class MyEntity implements Serializable
{
@Column
protected int myInteger;
@Transient
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
marked
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?
Greetings!
Naomi