-->
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.  [ 4 posts ] 
Author Message
 Post subject: entity-name in reverse engineered mapping files
PostPosted: Wed May 31, 2006 3:50 pm 
Newbie

Joined: Tue May 30, 2006 8:54 pm
Posts: 5
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.1

Mapping documents:N/A

Code between sessionFactory.openSession() and session.close():N/A

Full stack trace of any exception that occurs:N/A

Name and version of the database you are using:Sybase ASE 12.5

The generated SQL (show_sql=true):N/A

Debug level Hibernate log excerpt:N/A

I am trying to reverse engineer hibernate mapping files from the database that I already have. I see that the .hbm.xml files are getting created properly for typed persitent classes. However, I want to model all my entities as generic models ( Maps) and hence I need to include the atrribute "entity-name" to the "Class" element in my mapping files. I don't want to do this manually one mapping file at a time. I looked at the DefaultReverseEngineeringStrategy and tried to supply my own reverse engineering strategy class. But I am not sure which method I should overrride to be able to add additional attribute "entity-name". Is it possible in the first place to tweak hibernate tools to do this?


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 31, 2006 4:43 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
the easiest thing here would be to go in and change the hbm/* templates to use entity-name instead of class.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 31, 2006 6:35 pm 
Newbie

Joined: Tue May 30, 2006 8:54 pm
Posts: 5
Thanks Max. Can you point me to some links where I can get more information on how to change / customize the templates?. Also, is there a way I can specify custom templates without having to change them with in the jar archives?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 01, 2006 2:15 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
copy the needed templates to a directory (including the root directory names) and point the templatepath in ant to it or set it in eclipse on the code generation launch page.

_________________
Max
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.  [ 4 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.