-->
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.  [ 10 posts ] 
Author Message
 Post subject: how to use middlegen for mapping without "many-to-one&q
PostPosted: Sun Jun 06, 2004 10:36 pm 
Regular
Regular

Joined: Sat Apr 10, 2004 8:39 pm
Posts: 84
how to use middlegen for mapping without "many-to-one"

_________________
I am the creatxr of world.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 07, 2004 12:28 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
You can tell Middlegen (using the GUI) to not map the relationship at all by removing the direction attributes from the link on both ends.

Note: The current CVS version is better at dealing with this than with current releases. I am getting closer to doing a R5 release - have a few small items I want to include before I build the package.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 07, 2004 2:54 am 
Regular
Regular

Joined: Sat Apr 10, 2004 8:39 pm
Posts: 84
using GUI ?

<property name="gui" value="false"/>
your mean is set property gui to true?

and there is a choise?

is there a element or prperty for specify not to map the relationship?

where can i find the DTD for the middlegen-hibernate build.xml file?

_________________
I am the creatxr of world.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 07, 2004 4:45 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Yes set gui to true. You will find lots of items can be customised using this feature of middlegen in combination with the hibernate plugin.

No DTD sorry. I would read the Middlegen documentation on the Middlegen site and the Middlegen/Hibernate plugin docs on the Hibernate wiki.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 07, 2004 6:40 am 
Regular
Regular

Joined: Sat Apr 10, 2004 8:39 pm
Posts: 84
david wrote:
You can tell Middlegen (using the GUI) to not map the relationship at all by removing the direction attributes from the link on both ends.

Note: The current CVS version is better at dealing with this than with current releases. I am getting closer to doing a R5 release - have a few small items I want to include before I build the package.


which item it is? it seems none.
i click the relation line , and i click DEL for try to delete it, but it no use.

and the gui isn't expedience for using.

_________________
I am the creatxr of world.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 07, 2004 7:09 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
You can change the type of relationship (many-to-one to one-to-one) and the direction, eg, bi-directional to uni-direction or in your case no relationship. To do this hold either the CNTL key or the SHIFT key down when clicking on the end of the relationsip line your interested in. This is in the documentation.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 07, 2004 7:11 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Juts to save any confusion. The line will still be there (since a constraint exists) but you will remove the arrows on the ends thus no direction = no relation.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 07, 2004 9:13 pm 
Regular
Regular

Joined: Sat Apr 10, 2004 8:39 pm
Posts: 84
david wrote:
You can change the type of relationship (many-to-one to one-to-one) and the direction, eg, bi-directional to uni-direction or in your case no relationship. To do this hold either the CNTL key or the SHIFT key down when clicking on the end of the relationsip line your interested in. This is in the documentation.




case no relationship? CTRL key + click ?
>>>>>>>>>> can't change the cardinality of the one-side of a relationship that correspondes to primary key.

example tables:

create table member (id, name, pass, answer, question, primary key(id));
create table memberinfo(id, email, primary key (id), foreign key(id) references member(id));

i can remove the arrowhead or change many to one , but i can't remove the relation line and the one-to-one relation

>>>>>>>>> and i think if i must use the gui , it's unuseful. because i have several hundred tables.

_________________
I am the creatxr of world.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 07, 2004 10:10 pm 
Regular
Regular

Joined: Sat Apr 10, 2004 8:39 pm
Posts: 84
no arrows no relation?
middlegen also generate one-to-one element

<!-- associations -->
<!-- uni-directional one-to-one association to Member -->
<one-to-one
name="member"
class="airline.hibernate.Member"
outer-join="auto"
constrained="true"
/>

_________________
I am the creatxr of world.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 08, 2004 10:22 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
This is telling you you have a one-to-one uni-directional thus one arrow was showing. The line will not be removed - it show no arrows. I don't know how complex it is so try the CVS version as I have completed a few fixes in this area.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 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.