These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: getting the table name from a map?
PostPosted: Mon Dec 18, 2006 7:08 pm 
Newbie

Joined: Mon Dec 18, 2006 7:04 pm
Posts: 1
Is there a way to get the table name (not class name) from a map? For instance, due to naming conventions, I may have a class name of "com.test.lst.common.vo.test" but the table name is "V_TEST". Is there a function like getEntityName() with which I can get the table name aside from using an XML parser to get it?


Top
 Profile  
 
 Post subject: Table Name
PostPosted: Tue Dec 19, 2006 5:38 am 
Beginner
Beginner

Joined: Wed Aug 31, 2005 3:54 am
Posts: 45
Configuration conf = new Configuration().configure();
SessionFactory sessionFactory = conf.buildSessionFactory();
String pClassName = MyDto.class.getName();
PersistentClass pc = conf .getClassMapping(pClassName);
String result = pc.getTable().getName();


Top
 Profile  
 
 Post subject: So ?
PostPosted: Thu Jan 04, 2007 9:47 am 
Beginner
Beginner

Joined: Wed Aug 31, 2005 3:54 am
Posts: 45
Does it work ?

Bye

don't forget to rate.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.