[jboss-user] [EJB 3.0] - Re: @embedable annotation

Wolfgang Knauf do-not-reply at jboss.com
Wed Mar 11 06:04:25 EDT 2009


Hi kkangsar,

1) the DiscriminatorColumn name defaults to "DTYPE", so you need to specify the name only if you don't like the default ;-).

2) I don't have a simple answer this question ;-). Performance should not be an issue, because both approaches add the columns to the database table of the entity, so there are no additional entities. The approach with the @OneToOne relation ship (suggested by itsme) would result in an additional table. 
The benefit of the inheritance approach is that you don't need to add properties (access to your embedded object) to the subclass. So it saves you some lines of code ;-).

Hope this helps

Wolfgang

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4216895#4216895

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4216895



More information about the jboss-user mailing list