Hi > The OJB documentation says the following. > "The auto-update attribute specifies whether OJB > automatically stores this > reference attribute on storing the persistent object. This > attribute must be > set to false if using the OTM, ODMG or JDO layer. " > > If I use the ODMG layer why does this attribute need to be > false?.Can't I > take advantage of the "auto-update" attribute's feature using > ODMG API?.
THe ODMG provides a full fledged object level transaction management. it thus provides it's own mechanism to perform cascing operation in a much more intelligent way the the PB can do. That's why you have to disable the PB auto-* flags. > I tried using auto-update="true", in the OJB 0.9.5 > release(using ODMG API) > and, I was able to update (both the parent and child) fine > but while trying > to insert the parent I get a PRIMARY-KEY violation error.This > error goes > away if I give the auto-update="false". > > The error seems to indicate that the insert happens twice bcs > of the "true" > value on the auto-update flag.Has anyone seen this bug before?. This is not a bug. I clearly shows that OJB ODMG does perform cascading operation even if you disable them on the PB level. Once you enable cascading on the PB level, PB inserts your object first and later ODMG tries to insert it again. > Has anyone got the update and insert working (for parents and its > references) when the auto-update flag has a value of "true". As explained: if using ODMG those flags must be set to "false" to get the correct behaviour. cheers, Thomas > Thanks > Rajesh > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
