-->
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: Hibernate tools - class2hbm
PostPosted: Sun Dec 07, 2003 3:08 pm 
Where can I get some more info on Hibernate tools specifically class2hbm

when I use the tool to generate mapping file it by default creates a component i.e.:

If Employee class has a private member Department then in the mapping file (that is auto generated), Department becomes a component of Employee .

Secondly, if all of my classes have a common base class then the tool throws an exception (as I think the goXML method goes in a loop).

Before I go on and read / change the source code , I thought of checking if I am missing some high level settings ?

THANKS in Advance.


Top
  
 
 Post subject:
PostPosted: Sun Dec 07, 2003 3:33 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
class2hbm is documented in the tool docs (http://www.hibernate.org/hib_docs/refer ... etguide-s3)

But note that class2hbm is mainly experimental and generates no where near production quality mappings - it simply can't because a class file does not have all the needed information.

(but if you have ideas/patches for improvement you are welcome to provide them ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 08, 2003 1:55 am 
Newbie

Joined: Sun Dec 07, 2003 3:09 pm
Posts: 1
Thanks.

I know (and agree) about the limitations under such situation.

I have a couple of thousond classes that are generated from a huge XML schema - and I need to persisit most of those. Hence I want to generate a basic mapping file.

Let me try the runtime options described in the doc (link you posted). I may end up writting a schema to Mapping file generation tool - that if I write, will surely contribute.

Thanks again.


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.