Title: what does this mean?
That is what I suspected. I can't explain why Castor isn't assigning the id correctly, everything seems ok... but I get
----- Nested exception -----
java.sql.SQLException: General error: Column 'componentId' cannot be null
        at org.gjt.mm.mysql.MysqlIO.sendCommand(MysqlIO.java:497)
        at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(MysqlIO.java:550)
        at org.gjt.mm.mysql.Connection.execSQL(Connection.java:885)
        at org.gjt.mm.mysql.PreparedStatement.executeUpdate(PreparedStatement.java:389)
        at org.exolab.castor.jdo.engine.SQLEngine.create(SQLEngine.java:616)
I have definitely set the component to something without a null id, and mapped it:        
 
<field name="component" type="au.com.f2.shopping.page.TemplateComponent">
    <sql name="componentId" />
</field>
But I Get:
Castor: Loading au.com.f2.shopping.page.Page (11)
Castor: Loading au.com.f2.shopping.page.TemplateComponent (7)
Castor: Creating au.com.f2.shopping.page.TemplateComponentAssociation (null)
Perhaps the null here is just because I am using key-generator="IDENTITY", since it is the componentId that is the problem.
 
Can anoyone help? Please! :) I'm not seeing any problem in the source in SQLEngine either...
 
Cheers,
Brett
-----Original Message-----
From: Low Heng Sin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 28 November 2001 3:03 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] what does this mean?

That is the object identity.
-----Original Message-----
From: Brett Porter [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 28, 2001 11:55
To: [EMAIL PROTECTED]
Subject: [castor-dev] what does this mean?

I turned on castor's logging and looked into the file and got:

Loading Category (1)
Loading Retailer (3)
etc

What is the number in the brackets?

The problem I am having gives this line:
Loading TemplateComponent (Null)

So it would help diagnose it (see the archive - "creating a related object - id is null?" - I have no answers yet).

Cheers,
Brett

~*~*~*~*~*~*~
Brett Porter - Web Developer
f2 Network ~ everything essential
Ph: +61 2 8596 4437
Email: [EMAIL PROTECTED]

Reply via email to