Hello,
I have defined a bi-directional one-to-many CMR between two EJBs, PerformancePlan
and AssignedPerformanceElement. In my database, the FK field (PerformancePlanID)
in AssignedPerformanceElement is defined as NOT NULLable.
In my code, I am trying to remove an AssignedPerformanceElement from a
PerformancePlan, and I make my ValueObject (from XDoclet) to reflect this. When
I set this value object on the PerformancePlan, it attempts to call remove() on a
AssignedPerformanceElement instance.
In the console log, I get the following:
11:40:01,090 DEBUG [AssignedPerformanceElement] Executing SQL: UPDATE
ASSIGNEDPERFORMANCEELEMENT SET performancePlanID=? WHERE
assignedPerformanceElementID=?
11:40:01,131 INFO [STDOUT] p6spy - 1059752401131|41|3|statement|UPDATE
ASSIGNEDPERFORMANCEELEMENT SET performancePlanID=? WHERE
assignedPerformanceElementID=?|UPDATE ASSIGNEDPERFORMANCEELEMENT SET
performancePlanID='' WHERE assignedPerformanceElementID='170'
11:40:01,211 ERROR [LogInterceptor] TransactionRolledbackLocalException,
causedBy:
java.sql.SQLException: ORA-01407: cannot update
("HR"."ASSIGNEDPERFORMANCEELEMENT"."PERFORMANCEPLANID") to NULL
First, why is JBoss trying to UPDATE to remove the AssignedPerformanceElement?
Shouldn't this be a DELETE instead?
What am I missing? Is there anything in the documentation (I bought the whole
subscription set! I highly recommend it to anyone who hasnt bought it yet.)
Thanks
Troy Poppe
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user