Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Query by Class question and potential problem
Query by Class question and potential problem [message #603594] Wed, 14 March 2007 01:48
Jean-Denis Boudreault is currently offline Jean-Denis BoudreaultFriend
Messages: 55
Registered: July 2009

i am currently porting my old POJO/hibernate code to
EMF/Teneo/Hibernate. for many queries, i used to query by "load" or
"get" and specifying the class name.

i.e.: List myObjects =

what happens is an exception saying that the object MyObject is not

<exception>Caused by: org.hibernate.MappingException: Unknown entity:

Since this code used to work before teneo, i realized that it was due to
the interface / implementation of EMF.

Basically, if it is in the package "pack1.pack2", the it will create an
interface at:


and it will create an implementation at:


Teneo gives the interface name to the mapped entity in the hbm.xml file
(i.e. entity-name="MyObject"), and this seems to cause problems when
invoking by class type. If i provide the interface name, then it wont
work since hibernate expects the implementation. but if i use the
implementation, the name does not match the mapped entity.

If i query by string class name (or by query), all works fine. (as
expressed in the examples on the elver site)

my question is: is there a way to query by class type in teneo, or must
we explicitly provide the type by string name? perhaps can we force the
entity name in the hbm file to be the implementation one? and is this a
known limitation or am i missing something?

thanks a lot for your invaluable help!
Previous Topic:[Teneo] Log output
Next Topic:[Teneo]Multiple inheritance with multi-valued EReferences in second inherited class fails
Goto Forum:

Current Time: Mon Oct 26 02:59:42 GMT 2020

Powered by FUDForum. Page generated in 0.01632 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top