Let's be clear here, if you have
public class Base
{
    private long id;

    public long getId()
    {
        return id;
    }

    public void setId(long id)
    {
        this.id = id;
    }
}
@PersistenceCapable
public class Sub extends Base
{
    @PrimaryKey
    @Persistent
    public long getId()
    {
         return super.getId();
    }
    public void setId(long id)
    {
         super.setId(id);
    }
}

and persist a Sub, then ***DataNucleus*** will *not* insist that the
superclass is persistable. This is based on all DN datastore plugins
except GAE/J. If GAE/J does cause this then it is a bug in that plugin
and raise a bug on them, with stack trace and exception etc etc.

Also to be clear, the JDO and JPA specs do *not* allow magical
persistence of a field of a non-persistable superclass, unless you do
an override in a subclass like what you did there (to make it a
persistable property). You will *always* need that override.

--

You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.


Reply via email to