Hi,
I'm trying for hours but can't get it working. I'm new to EJB an xdoclet.
Why does the following not work? I need an unidirectional n:1 relation between
the following tables. Xdoclet-tags and jboss-output are below.
Table: address
(many fields - not important)
country (the country-code)
Table: country
short (the country-code)
long (the country-name)
Thanks in advance!
Thomas
##### AddressBean.java #####
/**
* @ejb.interface-method view-type="both"
* @ejb.persistence
* column-name="country"
* jdbc-type="VARCHAR"
* @ejb.relation
* name="Address2Country"
* role-name="Adress has a country"
* target-multiple="yes"
* target-ejb="Country"
* target-role-name="Country is needed by many Adresses"
* @jboss.relation
* fk-constraint="true"
* fk-column="country"
* @jboss.target-relation
* related-pk-field="shortName"
*/
public abstract CountryLocal getCountry();
/**
* @ejb.interface-method view-type="both"
*/
public abstract void setCountry(CountryLocal country);
##### CountryBean.java #####
/**
* @ejb.pk-field
* @ejb.persistence
* column-name="short"
* jdbc-type="VARCHAR"
* @ejb.interface-method view-type="both"
*/
public abstract String getShortName();
/*
* read-only
*/
public abstract void setShortName(String shortName);
##### JBOSS output #####
MBeans waiting for other MBeans:
[ObjectName: jboss.j2ee:jndiName=AddressHomeRemote,service=EJB
state: FAILED
I Depend On:
Depends On Me: org.jboss.deployment.DeploymentException: Role 'Adress has a
country' on Entity Bean 'Address' : CMP field for key not found: field
name='shortName', ObjectName:
jboss.j2ee:jndiName=CountryHomeRemote,service=EJB
state: FAILED
I Depend On:
Depends On Me: org.jboss.deployment.DeploymentException: Role 'Adress has a
country' on Entity Bean 'Address' : CMP field for key not found: field
name='shortName', ObjectName:
jboss.j2ee:jndiName=TicketHomeRemote,service=EJB
state: FAILED
I Depend On:
Depends On Me: org.jboss.deployment.DeploymentException: Role 'Adress has a
country' on Entity Bean 'Address' : CMP field for key not found: field
name='shortName']
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user