-->
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: hibernate tools Reverse Generation java file problem
PostPosted: Wed Dec 07, 2005 3:40 am 
Newbie

Joined: Wed Dec 07, 2005 3:26 am
Posts: 1
Hi, When I use hibernate tools(HibernateTools-3.1.0.beta1.zip) plugins of eclipse 3.1 Generation java file by Reverse Wizard,but in
generated file such as ***Home,I found " import static org.hibernate.criterion.Example.create;",Why ?
it call by code "... ... List results = sessionFactory.getCurrentSession()
.createCriteria("com.yuan.test.SystemCode")
.add( create(instance) )
.list();"
What should I do?
Thank you!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 07, 2005 3:43 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
**Home, I found ?!

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 09, 2005 6:10 pm 
Regular
Regular

Joined: Sat Nov 06, 2004 5:20 pm
Posts: 54
Location: Collierville, TN
If you look at the imports, the create() is a static import - supported in Java 5.0.

What you can do is tweak the import statement and take off the .create. (i.e. just import the fully-qualified class name. Then where the method is called, use the fully-qualified class name and append the .create().

<dry-humor>I'm sure you could adjust the template that creates the file - I think the source is available :-). </dry-humor>

On the other hand, I guess you could update to 5.0 and skip the above.

<Friday-shameless-plug>I need credits, I have questions</Friday-shameless-plug> :-)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 09, 2005 7:19 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
or just use cvs version where its fixed in ;)

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