-->
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: hbm2java: import base type / member visibility
PostPosted: Thu Jul 01, 2004 10:54 am 
Newbie

Joined: Thu Jul 01, 2004 10:39 am
Posts: 2
I used the generator, which is great but i have two questions:

1) is it possible to change the members visibility from private to protected ? (it may be annoying indeed for the subclasses)

2) when i use an hibernate type for the property tag in the mapping (eg calendar), the code generated is:

Quote:
private java.util.Calendar myDate;


Is it possible to have instead:

Quote:
import java.util.Calendar;
(...)
private Calendar myDate;


Or, in the worst case, i would prefer
Quote:
private Calendar myDate;

since my IDE is able to add the import clause

Note: i used hibernate-extensions-2.1.2


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 01, 2004 6:32 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Review to documentation - you can change the property scope using the approrpriate meta tags.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 02, 2004 6:04 am 
Newbie

Joined: Thu Jul 01, 2004 10:39 am
Posts: 2
hum, sorry, you're right about the point (1), i had just forgotten the tag were "inherrited".

Yet for the point (2), i read the documentation again, i tried the meta tag "extra-import" but it does seem to work.
May i missed something ?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 02, 2004 4:03 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
don't know why you want to use extra-import to specify the type of a property.

Either you use the native type attribute or use <meta attribute="property-type"/> to overrule the native type.

_________________
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.