On Nov 14, 4:33 pm, Abe Parvand <[email protected]> wrote:
> Do you have an example for JPA using inheritance, and preferrably an
> abstract class being involved as well? Thanks in advance.
If there will be only abstract superclasses for common functionality,
you simply need to use the @MappedSuperclass (instead of @Entity)
annotation, which is supported in the fully-released version of the
DataNucleus plugin in the 1.2.6 SDK.
@MappedSuperclass
public abstract class Species {
// this class does not have a table/Kind in the datastore;
// its fields become datastore fields of the subclasses
}
@Entity
public class Human extends Species {
// this class is the actual Kind
}
@Entity
public class LittleGreenAlien extends Species {
// this class is the actual Kind
}
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=.