Hi there,
I wish to do the following with xdoclets and appfuse.
I have a table called "Address" as follows
Address
======
id int,
street1 varchar(255),
street2 varchar(255) etc
I have tables
"Customer" and "Emploee"
Customer
======
id int,
company varchar(255),
etc
Employee
======
id int,
dept varchar(255),etc
Now a customer can have more than one address, such as shipping,delivery etc
and an employee can have more than one ie. his/her own and next of kin
Now I join the "Customer" and "Employee" table via junction tables to the
"Address" table
i.e.
"Customer_Address_Junction_Table"
=================
emp_id int,
address_id int
type varchar(255)
"Employee_Address_Junction_Table"
=================
emp_id int,
address_id int
type varchar(255)
How can I do this using pojos and xdoclets? I have tried the following in
the employee and customer class.
/**
* @hibernate.set lazy="true" outer-join="auto" inverse="true"
cascade="all-delete-orphan"
* @hibernate.collection-key column="customer_id"
* @hibernate.collection-many-to-many class="za.co.jumpingbean.Address"
column="address_id"
*/
This just results a foreign key column being placed in the Address table
which is not ideal. Any pointers appreciated.
thanks
--
View this message in context:
http://www.nabble.com/How-to-implement-junction-tables-with-xdoclet--tf2865226s2369.html#a8006918
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]