• Post Reply Bookmark Topic Watch Topic
  • New Topic

hibernate 3 - get table name from metadata  RSS feed

 
sergio martinelli
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I can't get table name from a mapped class in this way using Hibernate3:

Session session = InitSessionFactory. getInstance( ).getCurrentSession();
BasicEntityProperty classMetadata = (BasicEntityPropert y)session. getClassMetadata (employee.class) ;
classMetadata. getTableName( );


with hibernate2 I did it with this three simple lines of code.

Now I can't find nothing simple like that, is really hard get the table name from a mapped pojo.
Looking in the SessionFactory or Configuration class find something but I don't find the way.

Plase some help!
thanks.
-------------------------------------
My english stinks... I know!

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!