No.  You have to create each bean independently.

-dain

Ryan Marsh wrote:
> Does this mean if I have a 1:1 CMR relationship that when I create one
> object, the other is automatically created?
> 
> On Fri, 2002-07-12 at 13:15, Dain Sundstrom wrote:
> 
>>JBossCMP does not currently support not-null foreign keys.
>>
>>I also suggest you upgrade to 3.0.1 becaus there is a bug in 3.0 that 
>>causes this type of code to not work.
>>
>>-dain
>>
>>Ionel Gardais wrote:
>>
>>>Hi,
>>>
>>>i am trying to develop a system which looks like a Company/Employees
>>>CMR.
>>>
>>>Each employees got a reference on a company id.
>>>
>>>The two beans are linked through a relationship defined in the ejb-jar
>>>file.
>>>
>>>
>>>The employee bean got two abstract methods :
>>>- companyLocal getCompany() //get the company object from the employee
>>>bean
>>>- void setCompany(companyLocal co) //set the company object of an
>>>employee
>>>
>>>
>>>
>>>My major problem appears when I try to create an employee using the
>>>ejbCreate() method.
>>>
>>>if I try to do : setCompany(companyLocalHome.findByPrimaryKey(5)); I get
>>>a "calling non-static method from a static method blabla" at compil time
>>>and if I do not put the setCompany() line, it complains at running time
>>>that the company can't be null (define in my table to force each
>>>employee to belong to a company)
>>>
>>>I thought of passing a companyLocal object as a parameter to the
>>>employee's ejbCreate() method but I'm looking for a more clever way to
>>>do this.
>>>My current ejbCreate() of employee does not take parameters as it sets
>>>default values for the newly created employee.
>>>
>>>
>>>Any ideas are welcome,
>>>
>>>thanks,
>>>ionel
>>>
>>>
>>>
>>>-------------------------------------------------------
>>>This sf.net email is sponsored by:ThinkGeek
>>>Gadgets, caffeine, t-shirts, fun stuff.
>>>http://thinkgeek.com/sf
>>>_______________________________________________
>>>JBoss-user mailing list
>>>[EMAIL PROTECTED]
>>>https://lists.sourceforge.net/lists/listinfo/jboss-user
>>
>>
>>
>>
>>-------------------------------------------------------
>>This sf.net email is sponsored by:ThinkGeek
>>Gadgets, caffeine, t-shirts, fun stuff.
>>http://thinkgeek.com/sf
>>_______________________________________________
>>JBoss-user mailing list
>>[EMAIL PROTECTED]
> 
> https://lists.sourceforge.net/lists/listinfo/jboss-user



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to