Problem solved.
Since xdoclet 2.0 uses the bean it self as as a parameter for calls to the dao 
implementation, its important to set the primarykey
fields for the bean IN the dao implementation. If not, xdoclet will never set the 
primarykey in the createmethods in the BMP files -
which will give problems when you create and set the bean within the same transaction 
scope. e.g. a stateless sessionbean creating
and setting the bean fields (data is never saved, except for the creation).
I also needed to rewrite the entity-body template a bit, so the ejbCreate(...Data 
data) in fact loads 'this' with the data BEAFORE
getDao().create((...Bean) this); is called - today it doesn't do that.

-Jon

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Jon
> Finanger
> Sent: 15. november 2002 21:35
> To: [EMAIL PROTECTED]
> Subject: [Xdoclet-user] ifHasPrimkeyField problem
>
>
> Is there any trick in using ifHasPrimkeyField? :)
> To 'fix' a problem with xdoclet not generating the create methods correctly (at 
>least as i see it :) I need to set the pk for the
> bean after the getdao().create is executed, as it is today the pk is never set which 
>is when the create and the
> setmethods are done
> in the same transaction (like a stateless session creating a bean and set their 
>values before the method completes).
> I've tried to update the create part of entity-body.xdt but cant get the 
>ifHasPrimkeyField to work as described.
>
> Comments?
>
> -Jon
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by: To learn the basics of securing
> your web site with SSL, click here to get a FREE TRIAL of a Thawte
> Server Certificate: http://www.gothawte.com/rd524.html
> _______________________________________________
> Xdoclet-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/xdoclet-user
>
>



-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing 
your web site with SSL, click here to get a FREE TRIAL of a Thawte 
Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to