hi can anyone pass me a simple example using relationship(entity beans with relationship).I am not able to find any simple example so that i will be able to understand concept.i tried google search also but i was not successfull. I tried roster example for sun but it is bit complex to understand.
I'll send you mine, but I can't use email. I'll try to post the code at the ranch tomorrow, but you'll have to do the container config yourself. I've used J2EE RI. [ March 22, 2007: Message edited by: Satou kurinosuke ]
I'm sending you my java files and the descriptor generated by the Deploytool. You'll have to generate client stubs, SQL... I've tested it with J2EE RI and Cloudscape. It's pretty dirty and almost no comment, but I hope it can help. Movie and Trailer entity beans have a One-To-One relationship. This code checks : 1. The One-To-One relationship 2. Finder method 3. Select method 4. Home business method
The Movie entity bean
[ March 22, 2007: Message edited by: Satou kurinosuke ]
gowher, I wanted to send you the ear, but I can't use email. I've made this sample at my office, and the security policy is really strict.(no mail, no ftp. I'm lucky enough to be able to use the ranch !) I hope you can make one yourself. It's not difficult to make one with Deploytool. Sorry for the inconvenience.
It depends on the way the tool creates tables. It may not be foreign keys. In the Deploytool, you can check the generated SQLs when using "Auto generate SQL". It might be only standard columns refering to another table's column.