Is there a way to prevent JenaBean from saving specific properties?

9 views
Skip to first unread message

Arthur

unread,
Feb 14, 2011, 1:50:59 PM2/14/11
to jenabean-dev
The property is being used for book-keeping and I don't want it to end
up in the persisted model. Is there a way to annotate the property to
prevent it from being persisted?

Arthur

uoccou

unread,
Feb 14, 2011, 2:12:52 PM2/14/11
to jenabe...@googlegroups.com, Arthur
Use @transient on the accessor, a la TestBasic.java : http://code.google.com/p/jenabean/source/browse/trunk/src/test/java/test/fieldaccess/?r=374

--

Regards

Ultan O'Carroll


Archive Link
email@
Lewis TDI 1842
SkyTwenty
Blog

Taylor Cowan

unread,
Feb 14, 2011, 3:27:38 PM2/14/11
to uoccou, jenabe...@googlegroups.com, Arthur
Yes u may annotate or mark as transitive to prevent a property being saved

Sent from my Windows Phone

From: uoccou
Sent: Monday, February 14, 2011 1:13 PM
To: jenabe...@googlegroups.com
Cc: Arthur
Subject: Re: Is there a way to prevent JenaBean from saving specific properties?

--
You received this message because you are subscribed to the Google Groups "jenabean-dev" group.
To post to this group, send email to jenabe...@googlegroups.com.
To unsubscribe from this group, send email to jenabean-dev...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jenabean-dev?hl=en.

Taylor Cowan

unread,
Feb 14, 2011, 3:29:20 PM2/14/11
to uoccou, jenabe...@googlegroups.com, Arthur
Sorry, ultan is correct, thanks for helping Ultan.
Reply all
Reply to author
Forward
0 new messages