cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Durchholz, Joachim" <Joachim.Durchh...@hennig-fahrzeugteile.de>
Subject RE: Optimistic locking
Date Tue, 21 Feb 2012 17:28:40 GMT
> 1) In Cayenne Modeler, select an ObjEntity (the Java class) and
> under the Entity tab, turn Optimistic Locking on.  Then under
> the Attributes tab, turn Used for Locking on for each attribute
> you wish to lock on (you can do the same for Relationships if you
> desire).

Thanks, that's what I missed.

Oh right, it's in the FAQ, not in the JavaDoc.
Finally thought of asking Google. D'oh.

Though the only other page that mentions it is
https://cwiki.apache.org/CAY/cayenne-in-motion.html . (It's ancient,
 uses Cayenne 1.1 or 1.2. Not sure whether it's still up-to-date. I
tend to avoid ancient examples, which is why I missed that one in the
first place.)

The Javadoc for the commit functions should at least mention that
they might throw an optimistic locking exception. And what the class
of that exception is so people can write try...catch clauses.
And the Cayenne user guide should mention it, as part of the commit
stuff (here we're back at transactions ;-)). And maybe there should
be mention how to enable it if one is not using Modeler.

Sorry for all those nitty-gritty details, and I apologize for the
inconvenience if I just overlooked it in the docs.

Mime
View raw message