[EMAIL PROTECTED] wrote:
> Well, I have tried it a couple of ways. But currently, for
> the issue listed, here is what I did (Before any Entities are
> created at all):

Is your container generating PKs or are you?

> 1. I create a blank CreditApplicationLocal with the
> CreditApplicationDto.getAppId. I did this because I kept
> getting "PrimaryKey Not Found" errors when trying to create
> the CreditApplicationLocal with a CreditApplicationDto that
> contained other items that where not already created. :-(

Are you making a copy of the CreditApplicationDto and calling

  CreditApplicationHome.create(dto)

with that copy? Or are you using some other non-DTO create method with
the values taken from the DTO?

> 2. I take the structure I was sent:
> creditAppDto with AppId (with AppId)
>> --> BusinessCard (no AppId, no ID)
>> -->BusinessLine (no AppId, no ID)
>> -->SecuredCard (no AppId, no ID)
> 
> 2b. Create BusinessCard Entity from the
> CreditApplicationDto.getBusinessCardDto() method.
> 2c. do a creditApplicationLocal.setBusinessCard( businessCardLocal);

At this point, businessCardLocal.getCreditApplication() returns the CA
created above?

> 3b. Create BusinessLine Entity from the
> CreditApplicationDto.getBusinessLineDto() method.
> 3c. do a creditApplicationLocal.setBusinessLine( businessLineLocal);

Similarly, businessLineLocal.getCA() returns the CA, but now
businessCardLocal.getCA() returns null?

> 4b. Create SecuredCard Entity from the
> CreditApplicationDto.getSecuredCardDto() method.
> 4c. do a creditApplicationLocal.setSecuredCard( securedCardLocal);
> > If I skip 2, 3, or 4, the last one that I added to the
> CreditApplicationLocal get the [Product].appId set. The others do not.

So each time a new entity bean is attached to the CA, the old ones are
detached? It sounds like all three relations are actually being
considered the same 1:1 relation. For example, let's say you had 

    User <-- 1:1 --> Address

If you do the following:

    UserLocal user = userHome.create(...);
    AddressLocal home = addressHome.create(...);
    AddressLocal work = addressHome.create(...);
    user.setAddress(home);

At this point, home.getUser() returns the user. Now

    user.setAddress(work);

Now home.getUser() returns null.

True, it seems you have different relations, but this is what the
behavior sounds like. Is it definitely the *entity beans* that are
having their appID blown away? So it's not really related to the value
objects, right? Truly bizarre. Can you post the relation tags on both
sides (CA and the cards/lines)?

David Harkness
Sr. Software Engineer
Sony Pictures Digital Networks
(310) 482-4756


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to