Hi, You don't need act_id in Customer table because customer table is your master table.
TPS -----Original Message----- From: Ashwani Kalra [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 27, 2002 5:02 PM To: [EMAIL PROTECTED] Subject: 1 - many relation ship Hi, First let give table structure to explain my problem Customer Account ------------ ------------ cust_id(Primary Key) act_ id name balance act_id cust_id I am trying the 1-many relation ship example(customer has many accounts) on weblogic 6.1. When I try to establish an account(act_id=1,bal=100) with the customer(cust_id=1,name=ashwani) I do the following 1. In CustomerBean class add this acct to the collection of accounts already existing . 2. call setAccounts(Collection) 3. call account.setCustomer(Customer) What I see in the database is Customer ----------- Cust_id name act_id 1 ashwani <<empty>> Account ----------- Acct_id bal cust_id 1 100 1 My Question is why the field act_id in customer table is empty??Do I really need the act_id field in the Customer table. I think Customer is master table while account is transation table which keeps mapping between account and customer. Regds Ashwani =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help". =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
