Consider the following example: If I have a Shape class which has subclasses called Square, Circle, etc. with separate data members, I would like to treat this hierarchy as @Embeddable since I don't care about database identity, just equality. However, it seems that I cannot embed the Shape type into another @Entity since it is a class hierarchy and therefore there will be a variable numbers of fields to embed in the tuple depending on the subtype. Ideally I would like to use an inheritance one-table-per-class strategy on an @Embeddable type - something that's not mentioned in the EJB3 spec.
I can easily make Shape a real @Entity and do one of the standard inheritance strategies outlined in the spec, but then I have to worry about database identity. This will work, but it seems sub-optimal since these are really value objects. However, I can go this route and hide the identity in my implementation. Any suggestions? I am also open to suggestions that aren't in the EJB3 spec and require hibernate "extensions". Thanks. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3918539#3918539 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3918539 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
