Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Re: [Teneo] Need ClassMetadata but it's not present
Re: [Teneo] Need ClassMetadata but it's not present [message #683937] Tue, 14 June 2011 13:33
Martin Taal is currently offline Martin Taal
Messages: 5329
Registered: July 2009
Senior Member
Looks fine to me..., what you can do is download the hibernate source code so you can debug inside these methods and see
how the class metadata is keyed in the internal hashmap.

gr. Martin

On 06/14/2011 07:29 PM, forums-noreply@eclipse.org wrote:
> Hi Martin,
>
> Thanks for those excellent pointers! It looks like the EModelResolver will get me the right class!
>
> Unfortunately I'm now hitting an issue with SessionFactory.getClassMetadata() returning null. As a test if I do
> something like this:
>
> getSessionFactory().getClassMetadata(Asset.class);
> - or -
> getSessionFactory().getClassMetadata(AssetImpl.class);
>
> I get a null result. Asset is the autogenerated interface and AssetImpl the autogenerated implementation class.
>
> getClassMetadata says it takes "Class entityClass" an argument. Any hints as what I'm doing wrong? I'm sure it's some
> kind of newbie thing I'm missing. :(
>
> Cheers,
> mike
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Previous Topic:Code genration with EMF
Next Topic:[JS4EMF] goal of JS4EMF
Goto Forum:
  


Current Time: Mon Sep 01 21:57:26 EDT 2014

Powered by FUDForum. Page generated in 0.15222 seconds