In the Siena is a persistence API for Java, how would one annotate that a field is not persisted??
Asked
Active
Viewed 58 times
-1
-
Tried @Transient?? And what is that link for? – Rohit Jain Sep 29 '12 at 19:12
1 Answers
0
According to The docs.oracle.com Java Tutorial on Bean Persistence...
To exclude fields from serialization in a Serializable object mark the fields with the transient modifier.
transient int status;
Default serialization will not serialize transient and static fields.
... so I don't think you annotate that, but if you did I'd bet it was with the Transient
annotation.

Richard JP Le Guen
- 28,364
- 7
- 89
- 119
-
Well, he's talking about storing in Database.. And I'm not sure whether it would work with that.. Will it?? – Rohit Jain Sep 29 '12 at 19:28
-
@Rohit Jain - Not sure either... but the doc I linked to is about persistence; if it doesn't apply to database persistence, I think someone needs to get fired :P – Richard JP Le Guen Sep 29 '12 at 19:31
-