My friend asked me a doubt in EntityBeans. What shall we do if there are two primary key classes for a Bean, how can we map them in the deployment descriptor? Something like ... Address and Id are two primary keys for a person. I couldnt answer him. I want to know, can we do it first of all, if so, how can we do? Plz help me !!!
-
Need Help in EntityBeans (2 messages)
- Posted by: Dhanunjay E
- Posted on: June 07 2006 06:46 EDT
Hello EveryoneThreaded Messages (2)
- Re: Need Help in EntityBeans by Sohail Sikora on June 07 2006 17:36 EDT
- Re: Need Help in EntityBeans by Biswa Das on June 12 2006 05:26 EDT
-
Re: Need Help in EntityBeans[ Go to top ]
- Posted by: Sohail Sikora
- Posted on: June 07 2006 17:36 EDT
- in response to Dhanunjay E
Hello Everyone
You can never have 2 primary keys. Primary means first or one..... You can have a primary key that is made up of multiple fields - called a composite primary key. More info here: http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/BMP5.htmlMy friend asked me a doubt in EntityBeans. What shall we do if there are two primary key classes for a Bean, how can we map them in the deployment descriptor? Something like ... Address and Id are two primary keys for a person. I couldnt answer him. I want to know, can we do it first of all, if so, how can we do? Plz help me !!!
-
Re: Need Help in EntityBeans[ Go to top ]
- Posted by: Biswa Das
- Posted on: June 12 2006 05:26 EDT
- in response to Sohail Sikora
Both must derive from a single Base class.