Hello, my bad.  after investigating further I found that I need to set the
idMethod to "autoincrement" for the table within the schema. Without setting
this it was setting the primaryKeyMethod property of the TableMap to NONE. 
It now works as expected using both aproaches save() and doInsert().  the id
of the object is set after it is added to the database.

Byron

> I agree that using save() is the preferred approach, but do not think
> it will solve the problem as it should work the way Byron has attempted
> it.  Also not sure why to get the pk as an int, there should be few
> reasons to do this.
> 
> john mcnally
> 



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

Reply via email to