You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Deborah Nunley <de...@coxtarget.com> on 2005/02/18 16:07:49 UTC
Persistence question
Sequence of events
I create the order with a product and persist it twice (as we gather information).
I delete the product from the order (within the application).
I add another product to the order.
I save the order again.
Everything looks good from the debugger but I get the following exception
SQL failure while insert object data for class com.valpak.productorder.couponslug.CouponSlug, PK of the given object is [ couponSlugId=665055], object was com.valpak.productorder.couponslug.CouponSlug@1262f7c[couponSlugId=665055,sequenceId=1,address=[],offer=[com.valpak.productorder.couponslug.CouponSlugOffer@1f784d7[couponSlugOfferId=0,offerText=offer,additionalDisclaimerText=,couponSlugDisclaimer=[],productImage=[],expirationDate=<null>,startDate=Tue Aug 31 00:00:00 EDT 2004,endDate=Wed Aug 31 00:00:00 EDT 2005,sequenceId=1,printLimit=0,displayExpiration=true]],webLink=[],productImage=[],printable=true,displayRanking=39000,background=com.valpak.color.Color@1325aef[colorId=1,colorName=<null>,hexCode=<null>],zoneMap=com.valpak.targetedcontent.ZoneMap@f007ad,couponSlugType=com.valpak.productorder.couponslug.CouponSlugType@8822a0[couponSlugTypeId=2,couponSlugTypeName=<null>]], exception message is [Attempt to insert duplicate key row in object 'Coupon_Slugs' with unique index 'PK_COUPON_SLUGS'
Deb Nunley
Re: Persistence question
Posted by Armin Waibel <ar...@apache.org>.
Hi Deb,
what OJB version do you use? Which api?
Could you post the whole stack trace.
regards,
Armin
Deborah Nunley wrote:
> Sequence of events
>
> I create the order with a product and persist it twice (as we gather information).
> I delete the product from the order (within the application).
> I add another product to the order.
> I save the order again.
>
> Everything looks good from the debugger but I get the following exception
>
> SQL failure while insert object data for class com.valpak.productorder.couponslug.CouponSlug, PK of the given object is [ couponSlugId=665055], object was com.valpak.productorder.couponslug.CouponSlug@1262f7c[couponSlugId=665055,sequenceId=1,address=[],offer=[com.valpak.productorder.couponslug.CouponSlugOffer@1f784d7[couponSlugOfferId=0,offerText=offer,additionalDisclaimerText=,couponSlugDisclaimer=[],productImage=[],expirationDate=<null>,startDate=Tue Aug 31 00:00:00 EDT 2004,endDate=Wed Aug 31 00:00:00 EDT 2005,sequenceId=1,printLimit=0,displayExpiration=true]],webLink=[],productImage=[],printable=true,displayRanking=39000,background=com.valpak.color.Color@1325aef[colorId=1,colorName=<null>,hexCode=<null>],zoneMap=com.valpak.targetedcontent.ZoneMap@f007ad,couponSlugType=com.valpak.productorder.couponslug.CouponSlugType@8822a0[couponSlugTypeId=2,couponSlugTypeName=<null>]], exception message is [Attempt to insert duplicate key row in object 'Coupon_Slugs' with unique inde
x 'PK_COUPON_SLUGS'
>
>
> Deb Nunley
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org