-->
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: hbm2java and invalid imports
PostPosted: Fri Jul 30, 2004 12:22 pm 
Newbie

Joined: Fri Jul 30, 2004 12:06 pm
Posts: 5
Location: Madrid
Hi, I'm very new to Hibernate, I've been playing with hbm2java (from hibernate-extensions-2.1.2) and found something that seems to be a bug.

In my .hbm.xml file I have defined the attribute "package" for "hibernate-mapping". Every class has an attribute "name" non-qualified and the .java files are correctly generated.

But for every many-to-one tag I have to define the attribute "class" as the fully-qualified classname in order to avoid an incorrect "import" in the generated .java file. The problem is that IMO hbm2java shouldn't generate that "import" line because if either:
1) the class is not qualified it means it should be in the same package (and the import is not needed)
or 2) the class is fully-qualified and the import is not needed too.

Am I wrong or is any parameter to avoid this effect? I have a workaround for this, but I would prefer to have only one reference for the package in the .hbm.xml.

Best regards,
Jose M Beas


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 30, 2004 12:51 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
hmm - I *think* the CVS version of hbm2java honor's the package attribute.

Please check there - and if it still fails make a jira for it (with a failing, but complete hbm.xml file)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 18, 2005 8:55 am 
Newbie

Joined: Wed Jul 07, 2004 4:38 am
Posts: 5
Hi, I have exactly the same problem, i'm using hbm2java from hibernate-ext dated 22 november 2004.
Is there any solution to this?
thanks


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.