db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject Re: Dependent and element-dependent
Date Sat, 28 Jan 2006 23:10:23 GMT
FYI, at the Friday JDO TCK conference call, Michelle volunteered to  
update the schema with user-decipherable foreign key names.

Craig

On Jan 27, 2006, at 8:56 AM, Michael Watzek wrote:

> Hi Andy,
>
>
>>> Do you have some info regarding what this FK is ?
>>> Sadly I've no idea what Derby's nice message
>>> "constraint 'SQL060127010242262' for key (3)"
>>> means. It might have been nice for it to provide a column name ?  
>>> or a related table ? but no we get the result of '"SQL" + random 
>>> ()' perhaps
>>>
>> It seems that the FK name is generated by Derby. I checked the FK  
>> definitions in schema 1: There are several unnamed FKs in the  
>> schema referencing table 'persons' which may be candidates for the  
>> message above:
>> - persons.manager
>> - persons.mentor
>> - persons.hradvisor
>> - insuranceplans.employee
>> - employee_phoneno_type.empid
> I renamed the FKs above in my local schema. It appears that the  
> problem occurs on the manager column. Please see below.
>
> Regards,
> Michael
>
>     [java] ERROR 23503: DELETE on table 'PERSONS' caused a  
> violation of foreign key constraint 'EMPS_MANAGER' for key (3
> ).  The statement has been rolled back.
>     [java]      at  
> org.apache.derby.iapi.error.StandardException.newException(Unknown  
> Source)
>     [java]      at  
> org.apache.derby.impl.sql.execute.ReferencedKeyRIChecker.doCheck 
> (Unknown Source)
>     [java]      at  
> org.apache.derby.impl.sql.execute.RISetChecker.doPKCheck(Unknown  
> Source)
>     [java]      at  
> org.apache.derby.impl.sql.execute.DeleteResultSet.collectAffectedRows( 
> Unknown Source)
>     [java]      at  
> org.apache.derby.impl.sql.execute.DeleteResultSet.open(Unknown Source)
>     [java]      at  
> org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown  
> Source)
>     [java]      at  
> org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown  
> Source)
>     [java]      at  
> org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement 
> (Unknown Source)
>     [java]      at  
> org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(Unknown  
> Source)
>     [java]      at  
> com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute 
> (NewProxyPreparedStatement.java:911)
>     [java]      at  
> org.jpox.store.rdbms.request.Request.executeUpdate(Request.java:69)
>     [java]      at  
> org.jpox.store.rdbms.request.DeleteRequest.execute 
> (DeleteRequest.java:239)
>     [java]      at org.jpox.store.rdbms.table.ClassTable.delete 
> (ClassTable.java:2170)
>     [java]      at org.jpox.store.rdbms.table.ClassTable.delete 
> (ClassTable.java:2175)
>     [java]      at org.jpox.store.rdbms.table.ClassTable.delete 
> (ClassTable.java:2175)
>     [java]      at org.jpox.store.StoreManager.delete 
> (StoreManager.java:794)
>     [java]      at  
> org.jpox.state.StateManagerImpl.internalDeletePersistent 
> (StateManagerImpl.java:4010)
>     [java]      at org.jpox.state.StateManagerImpl.deletePersistent 
> (StateManagerImpl.java:3966)
>     [java]      at  
> org.jpox.AbstractPersistenceManager.internalDeletePersistent 
> (AbstractPersistenceManager.java:1342)
>     [java]      at  
> org.jpox.AbstractPersistenceManager.deletePersistentAll 
> (AbstractPersistenceManager.java:1380)
>     [java]      at org.apache.jdo.tck.JDO_Test.deleteTearDownClasses 
> (JDO_Test.java:396)
>     [java]      at org.apache.jdo.tck.JDO_Test.localTearDown 
> (JDO_Test.java:318)
>     [java]      at org.apache.jdo.tck.JDO_Test.tearDown 
> (JDO_Test.java:287)
>     [java]      at org.apache.jdo.tck.JDO_Test.runBare 
> (JDO_Test.java:234)
>     [java]      at org.apache.jdo.tck.util.BatchTestRunner.start 
> (BatchTestRunner.java:120)
>     [java]      at org.apache.jdo.tck.util.BatchTestRunner.main 
> (BatchTestRunner.java:95)
>
> -- 
> -------------------------------------------------------------------
> Michael Watzek                  Tech@Spree Engineering GmbH
> mailto:mwa.tech@spree.de        Buelowstr. 66
> Tel.:  ++49/30/235 520 36       10783 Berlin - Germany
> Fax.:  ++49/30/217 520 12       http://www.spree.de/
> -------------------------------------------------------------------

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Mime
View raw message