Teneo/EclipseLink/EMF find Object [message #634767] |
Sat, 23 October 2010 10:08 |
Dennis Melzer Messages: 244 Registered: July 2009 |
Senior Member |
|
|
Hello,
How can I find a Object via EClass?
For Example EMF generates a interface Person and PersonImpl class. I generate with Teneo the orml.xml.
Now i want to find da Object with the entityManager.
But it doesn't work because the JPA layer doesn't know the interfaces.
java.lang.IllegalArgumentException: Unknown entity bean class: interface Person
public DBObject find(EClass entityClass, Object primaryKey) {
return (DBObject ) entityManager.find(entityClass.getInstanceClass(), primaryKey);
}
How i can get the right class?
[Updated on: Sat, 23 October 2010 10:09] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02557 seconds