I was just comparing our model with yours. Many thanks for publishing Estatio.
There are a lot of things we have used (and learnt)... El 13/01/2014, a las 16:30, Jeroen van der Wal <jer...@stromboli.it> escribió: > Hi Oscar, > > Thanks for pointing to this, there's definitely room for improvement > in this area. I will start some refactoring tomorrow and will let you > know whether @Version could also be moved up in the hierarchy. > > Let me know if you have further feedback. > > Cheers, > > Jeroen > > > When we started with JDO we didn't > > On Sun, Jan 12, 2014 at 7:11 PM, GESCONSULTOR - Óscar Bou > <o....@gesconsultor.com> wrote: >> >> Hi, Jeroen. >> >> I've seen on Estatio that the following annotations are repeat for each >> class, despite you have a base class defined (EstatioMutableObject): >> >> @javax.jdo.annotations.PersistenceCapable(identityType = >> IdentityType.DATASTORE) >> @javax.jdo.annotations.DatastoreIdentity( >> strategy = IdGeneratorStrategy.NATIVE, >> column = "id") >> >> As per [1], seems that it's just enough to annotate just the base class. >> Citing: >> >> When you have an inheritance hierarchy, you should specify the identity type >> in the base class for the inheritance tree. This is then used for all >> persistent classes in the tree. >> >> >> >> What I'm not finding on the DataNucleus documentation any explicit reference >> that indicates whether: >> >> @javax.jdo.annotations.Version( >> strategy = VersionStrategy.VERSION_NUMBER, >> column = "version") >> >> must be annotated on each class on a hierarchy, or it's just enough to >> annotate the base class. >> >> Same happens with: >> >> @javax.jdo.annotations.Discriminator( >> strategy = DiscriminatorStrategy.CLASS_NAME, >> column="discriminator") >> >> Does it respond to any "hidden" issue with JDO, DataNucleus, etc.? >> >> >> Perhaps it would be enough to just annotate EstatioMutableObject. >> >> >> >> Thanks, >> >> Oscar >> >> >> >> >> >> [1] >> http://www.datanucleus.org/products/datanucleus/jdo/datastore_identity.html