Register / Login
Win a copy of
Java Mock Exams (software)
this week in the
Programmer Certification (OCPJP)
this forum made possible by our volunteer staff, including ...
Stephan van Hulst
Object Relational Mapping
hibernate 3 - get table name from metadata
posted 8 years ago
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!
My english stinks... I know!
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
Boost this thread!
JPA: Joined Table ID of subclass
Newbie stateful vs stateless session bean question
Hibernate is returning proxy objects even if no matching row is found on the database
How to obtain configuration object?
Hibernate 2: check if table exists and get the name of the table out of the class