It works. Thanks a lot. 

-----Original Message-----
From: John McNally [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 02, 2002 2:22 PM
To: Turbine Users List
Subject: Re: IdGenerator for table 'X' is null


do not capitalize the B.  idBroker should be idbroker.  you should get
xml warnings during parsing if you are validating.

john mcnally

"REN,ZHANGLING (HP-Boise,ex1)" wrote:
> 
> Sorry for the typo in the message. I did use idMethod="idbroker" for the
> attribute. Here is the schema:
> 
> <app-data>
> <database>
>   <table name="Event" idMethod="idBroker">
>     <column name="eventId" required="true" primaryKey="true"
>             type="INTEGER" autoIncrement="true"/>
>     <column name="eventName" type="VARCHAR" size="50"/>
>     <column name="eventType" type="VARCHAR" size="50"/>
> </database>
> </app-data>
> 
> The doBuild() method in EventMapBuilder have:
>         tMap.setPrimaryKeyMethod("idBroker")
> 
> Thanks a lot for your help!
> 
> Zhangling Ren
> 
> -----Original Message-----
> From: John McNally [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 02, 2002 1:23 PM
> To: Turbine Users List
> Subject: Re: IdGenerator for table 'X' is null
> 
> The attribute should be idMethod="idbroker".
> 
> john mcnally
> 
> "REN,ZHANGLING (HP-Boise,ex1)" wrote:
> >
> > Hello everyone,
> > The following exception is threw:
> > java.lang.Exception: IdGenerator for table 'Event' is null
> >         at org.apache.torque.util.BasePeer.doInsert(BasePeer.java:777)
> >         at
> > com.hp.cp.psp.database.om.BaseEventPeer.doInsert(BaseEventPeer.java:175)
> >         at
> > com.hp.cp.psp.database.om.BaseEventPeer.doInsert(BaseEventPeer.java:446)
> >         at com.hp.cp.psp.database.om.BaseEvent.save(BaseEvent.java:497)
> >         at com.hp.cp.psp.database.om.BaseEvent.save(BaseEvent.java:462)
> >         at com.hp.cp.psp.database.om.BaseEvent.save(BaseEvent.java:445)
> >         at
> com.hp.cp.psp.database.Test_IDHelper.main(Test_IDHelper.java:42)
> > when I tried to save the following object to the database:
> >             Event event = new Event();
> >             event.setEventName("name");
> >             event.setEventType("type");
> >             event.save();
> >
> > I am using the IDMethod="idbroker" and the idBroker table is created and
> > populated with correct ID_TABLE_ID, TABLE_NAME, NEXT_ID and QUANTITY.
The
> > primary key in the event table is eventID with datatype eventId INTEGER
(I
> > tried with both with and without AUTO_INCREMENT).
> >
> > I am using the Torque-standalone and mysql. I downloaded the newer
> > torque-3.0-dev version on 12/31/01 and the problem still occurs. I am
new
> to
> > Torque and not sure whether I missed some thing in the environment
setting
> > or what.
> >
> > Any suggestions will be greatly appreciated.
> >
> > Thanks a lot
> >
> > Zhangling Ren
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to