[jboss-user] [EJB 3.0] - EntityManager, annotation question
mandrewes
do-not-reply at jboss.com
Thu Oct 5 13:39:52 EDT 2006
Hi,
I have not been able to find any documentation on this, at least so far, I'm thinking that the solution is probably an annotation (which are new to me).
I have a couple of objects that are extended from a base object, I store them all in one table "assets". It's only the classes logic methods that differ, all persisted fields are in the base object.
I am not using the MappedSuperclass annotation because, from what i read the behaviour is not what I want, and it doesnt look like it will help me.
I can persist the objects fine, and use the find() method; my problem occurs when I try to use the createQuery() method of entitimanager to read data out of the table "assets", the name "assets" has no class named the same, so I get an exception "assets is not mapped [from assets a]".
How do I tell the Entity manager to map this class to a given class or interface without using a native query? (which I have not yet tried).
regards
Michael
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976362#3976362
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3976362
More information about the jboss-user
mailing list