|Re: [Teneo] Need ClassMetadata but it's not present [message #687412]
||Wed, 08 June 2011 07:58
| Martin Taal
Registered: July 2009
Yes getClassMetaData is supposed to work, the getSessionFactory returns a plain/standard Hibernate SessionFactory
implementation (no Teneo overrides there). But I think that the 'problem' is in the parameter passed to the
getClassMetaData, maybe Vaadin uses the classname or the class while Teneo maps using entity names. I guess that is the
thing to check.
Btw, Teneo questions are answered on the main EMF newsgroup, which I added as a cc.
And if you are using EMF in a web server environment (so not RCP) then it can make sense to checkout the Texo projects,
it generates real pojo's (no EMF compile dependencies) while still supporting many/most EMF concepts (XML serialization,
On 06/07/2011 11:36 PM, firstname.lastname@example.org wrote:
> I'm trying to get a Vaadin Hibernate Container (HbnContainer) to work with my Teneo based datastore. There is an
> HbnContainer add-on class supplied by the Vaadin folks which I'm trying to use with one of the Teneo model managed
> classes I have. The HbnContainer makes extensive use of ClassMetadata from the SessionFactory. In particular
> HbnContainer uses the getPropertyType, getIdentifier, getIdentifierType, getIdentifierProperty methods.
> Unfortunately my instantiated HbDataStore.getSessionFactory().getClassMetadata() returns null. The SessionFactory()
> seems to work fine for all my other "normal" uses (mainly getting Session).
> My Teneo model is being loaded from a .ecorediag -> .ecore -> .genmodel file.
> So my questions are:
> 1) Is HbDataStore.getSessionFactory().getClassMetadata() suppose to return a real ClassMetadata or is this not supported
> with Teneo?
> 2) If getClassMetadata() is suppose to work, any suggestions on what I'm missing?
> 3) If getClassMetadata() is not supported, any suggestions for getting similar data to getPropertyType, getIdentifier,
> getIdentifierType, getIdentifierProperty?
> URL for HbnContainer: http://vaadin.com/directory#addon/hbncontainer
With Regards, Martin Taal
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: email@example.com - firstname.lastname@example.org
Web: www.springsite.com - www.elver.org
Powered by FUDForum
. Page generated in 0.05087 seconds