-->
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.  [ 1 post ] 
Author Message
 Post subject: Name property problem
PostPosted: Wed Jun 01, 2011 7:37 am 
Newbie

Joined: Wed Jun 01, 2011 7:34 am
Posts: 1
Hi,

So I hoped my mappings would be complete, but as usual there are problems :D

My application would be used to create invoices, which means the address or any other information of a client may not change.

Now, I though when retrieving information of a class other then that of the mapping file, you should add a component tag ex:

Code:
<component name="Client" class="Client" access="nosetter.pascalcase-underscore">
      <property name="Name" not-null ="true"></property>
      <property name="Tva" not-null ="true"></property>
    </component>


But invoices are also related to a client, which means you need to have a "many-to-one"-tag of Client. That makes its so I have to names "Clients"

Code:
<component name="Client" class="Client" access="nosetter.pascalcase-underscore">
      <property name="Name" not-null ="true"></property>
      <property name="Tva" not-null ="true"></property>
    </component>
    <many-to-one name ="Client" not-null ="true" class="Client" column="ClientID" cascade="save-update"> </many-to-one>


This off course doesn't work, but how would I be able to resolve this?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.