|
First,
make sure you use cvs version. Second, please
check to make sure that your scenario wasn’t existed in test cases first. I
didn’t read the whole thread, but I am pretty sure some tests do test that: “cannot use related objects which use a
key-generator”. I can,
unfortunately, only able take a look and fix at very small number (probably 2
or 3) bugs report a month, unless it is readily run. So, I need help if you
want me to look at it. Thomas -----Original Message----- >From: Brett Porter
[mailto:[EMAIL PROTECTED]] >Sent: Tuesday, November 27, 2001 10:07
PM >To: [EMAIL PROTECTED] >Subject: [castor-dev] Bug report WAS:
what does this mean? > >that worked - so consider this a bug report: > >"cannot use related objects which use a
key-generator" > >(I get the feeling bugzilla is a bit out of date since
things are marked at patched, but not closed, and are reported against castor
0.79 :) > >Cheers, >Brett >-----Original Message----- >From: Brett Porter >Sent: Wednesday, 28 November 2001 4:02 PM >To: [EMAIL PROTECTED] >Subject: Re: [castor-dev] what does this mean? >Ok, I'll give it a try. > >Incidentally, TemplateComponent is not a dependant, it is just
related. This is required because it is a many-to-many relationship between
page and template component. I couldn't use an actualy man-to-many relationship
though because there is a variable on the association - hence the need for the
association class TemplateComponentAssoc. > >I am inside Tomcat 4. This is not a long transaction
although I do use them for other things. > >Thanks, >Brett >-----Original Message----- >From: Keith Chew [mailto:[EMAIL PROTECTED]] >Sent: Wednesday, 28 November 2001 3:50 PM >To: [EMAIL PROTECTED] >Subject: Re: [castor-dev] what does this mean? > >Hi Brett > >Try removing the keygen for the dependent field, ie
TemplateComponent in your case. > >PS: What environment are you running castor in? app server
(eg JBoss) or standalone? > >Keith > >-----Original Message----- >From: Brett Porter [mailto:[EMAIL PROTECTED]] >Sent: Wednesday, 28 November 2001 5:43 p.m. >To: [EMAIL PROTECTED] >Subject: Re: [castor-dev] what does this mean? >Hi, and thanks for your help. A question: > >remove the key-gen on which? The TemplateComponent or the
TemplateComponentAssocation? > >Structure: > >Page (1) -----by pageId in TCA----> (n) TemplateComponentAssociation
(n) ---- by componentId in TCA ---> (n) TemplateComponent > >Each generates ID by identity. > >If I were to remove this, I must assign an ID each time
which will be a real nuisance (but at least it'll work :) > >Cheers, >Brett > >-----Original Message----- >From: Keith Chew [mailto:[EMAIL PROTECTED]] >Sent: Wednesday, 28 November 2001 3:32 PM >To: [EMAIL PROTECTED] >Subject: Re: [castor-dev] what does this mean? >Hi Brett > >Can you try removing the key-gen to see if you still have
the problem? Numerous posts have indicated that this could be a potential
problem. > >Keith C > > >-----Original Message----- >From: Brett Porter [mailto:[EMAIL PROTECTED]] >Sent: Wednesday, 28 November 2001 5:24 p.m. >To: [EMAIL PROTECTED] >Subject: Re: [castor-dev] 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] > |
Title: what does this mean?
- [castor-dev] Bug report WAS: what does this mean? Brett Porter
- Re: [castor-dev] Bug report WAS: what does this me... Thomas Yip
- Re: [castor-dev] Bug report WAS: what does thi... Jacek Kruszelnicki
