• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

hibernate 3 - get table name from metadata

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!

 
His brain is the size of a cherry pit! About the size of this ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic