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: Eclipse 6.01 Reverse Engineering
PostPosted: Wed Dec 26, 2007 1:27 pm 
Newbie

Joined: Wed Dec 26, 2007 1:03 pm
Posts: 2
Hi,

I am a newbie in Hibernate and I am trying to develop my first application.

In Eclipse 6.01 I am generating, with reverse engineering tools, the java classes for an MS Sql Server database tables.

The question is How can I, using these Eclipse tools, define the collection type generated for one-to many relationships. Eclipse is generating Set but I would like to generate List.

Besides that Eclipse is generating something like this:
private Set fund = new HashSet(0);

But the compiler wants this:
private Set fund = new HashSet<Object>(0);

I have a very large model and I cannot fix one by one this problems. Is there a way to ask for Eclipse to generate automatically the second statement ???

Maybe this is too simple but I could not find in the wizard pages a solution.

Can you help me

Thanks in advance


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 26, 2007 1:45 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
There is no such thing as Eclipse 6 so I'm not sure what you are referring to.


About you specific problem then hibernate tools will generate that kind of code if you enable java5 in the code generation options.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 26, 2007 2:21 pm 
Newbie

Joined: Wed Dec 26, 2007 1:03 pm
Posts: 2
max wrote:
There is no such thing as Eclipse 6 so I'm not sure what you are referring to.


About you specific problem then hibernate tools will generate that kind of code if you enable java5 in the code generation options.


Hi Max,

I am using MyEclipse 6.0.1-GA-200710 and if you create a database connection Driver in MyEclipse Java Persistence Perspective and right-click in a Table name you will see an option for Hibernate Reverse Engineering

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 26, 2007 4:17 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
yes, MyEclipse contains a permutaiton of and old Hibernate Tools and they disabled a couple of features...I assume the option for enabling/disabling java5 support is one of them.

p.s. I recommend you use Hibernate Tools if you want specific usage tips in this forum ,)

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