Hi, I have created a simple example in which one session bean is performing delete on entity Movie and director.
Client Object is com.rage.EntityBean1 is present inside the jar only. Also, there is cascade delete and foreign key constraint on table Movie(hjsajdada) in database. EntityBean.jar <http://openejb.979440.n4.nabble.com/file/n4660346/EntityBean.jar> Create Script: CREATE TABLE Director( [id] [int] IDENTITY(1,1) NOT NULL, [firstName] [varchar](255) NULL, [lastName] [varchar](255) NULL, PRIMARY KEY CLUSTERED ( [id] ASC )) CREATE TABLE Movie( [ID] [int] IDENTITY(1,1) NOT NULL, [title] [varchar](255) NULL, [year] [int] NULL, [hjsajdada] [int] NULL, PRIMARY KEY CLUSTERED ( [ID] ASC )) ALTER TABLE Movie WITH NOCHECK ADD CONSTRAINT FK_COND_MOVIEEQ_ID1 FOREIGN KEY(hjsajdada) REFERENCES Director (id) ON DELETE CASCADE Thanks, Bibhuti EntityBean.jar <http://openejb.979440.n4.nabble.com/file/n4660346/EntityBean.jar> -- View this message in context: http://openejb.979440.n4.nabble.com/Optimi-sticLockException-Optimistic-locking-errors-were-detected-when-flushing-to-the-data-store-tp4660338p4660346.html Sent from the OpenEJB User mailing list archive at Nabble.com.
