I have the following situation:


[img]http://foto.volja.net/zoom_image.php?lang=slo&album_id=9058&image_id=70212[/img]



AndroMDA 3.1-M1 generates all necessary code (Country.hbm.xml, Country.java, 
CountryImpl.java) except there is no reference to Country class in Address.java.



Excerpt of Person.hbm.xml, which references Address class:

&nbsp; &nbsp; &nbsp; &nbsp; <component name="address" 
class="com.eficus.model.organization.AddressImpl">

&nbsp; &nbsp; &nbsp; &nbsp; <property name="street" type="java.lang.String">

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <column name="ADDRESS_STREET" 
not-null="false" unique="false" sql-type="CHARACTER VARYING&#40;100&#41;"/>

&nbsp; &nbsp; &nbsp; &nbsp; </property>

&nbsp; &nbsp; &nbsp; &nbsp; <property name="postCode" type="java.lang.String">

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <column name="ADDRESS_POST_CODE" 
not-null="false" unique="false" sql-type="CHARACTER VARYING&#40;10&#41;"/>

&nbsp; &nbsp; &nbsp; &nbsp; </property>

&nbsp; &nbsp; &nbsp; &nbsp; <property name="city" type="java.lang.String">

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <column name="ADDRESS_CITY" 
not-null="false" unique="false" sql-type="CHARACTER VARYING&#40;50&#41;"/>

&nbsp; &nbsp; &nbsp; &nbsp; </property>

&nbsp; &nbsp; &nbsp; &nbsp; <property name="region" type="java.lang.String">

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <column name="ADDRESS_REGION" 
not-null="false" unique="false" sql-type="CHARACTER VARYING&#40;30&#41;"/>

&nbsp; &nbsp; &nbsp; &nbsp; </property>

&nbsp; &nbsp; &nbsp; &nbsp; <many-to-one name="country" 
class="com.eficus.model.organization.CountryImpl" fetch="$otherEnd.outerJoin" 
foreign-key="$otherEnd.foreignKeyConstraintName">

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <column name="$otherEnd.columnName" 
not-null="true" sql-type="$otherEnd.sqlType"/>

&nbsp; &nbsp; &nbsp; &nbsp; </many-to-one>

&nbsp; &nbsp; &nbsp; &nbsp; </component>





There is many-to-one relationship to Country as it should be. 



The problem is that Address.java is missing the following code:

&nbsp; &nbsp; private com.eficus.model.organization.Country country;



&nbsp; &nbsp; /**

&nbsp; &nbsp; &nbsp;* 

&nbsp; &nbsp; &nbsp;*/

&nbsp; &nbsp; public com.eficus.model.organization.Country getCountry&#40;&#41;

&nbsp; &nbsp; &#123;

&nbsp; &nbsp; &nbsp; &nbsp; return this.country;

&nbsp; &nbsp; &#125;



&nbsp; &nbsp; public void setCountry&#40;com.eficus.model.organization.Country 
country&#41;

&nbsp; &nbsp; &#123;

&nbsp; &nbsp; &nbsp; &nbsp; this.country = country;

&nbsp; &nbsp; &#125;





Why is this code missing?



Borut
_________________________________________________________
Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=1291#1291
Posting to http://forum.andromda.org/ is preferred over posting to the mailing 
list!


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Andromda-user mailing list
Andromda-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to