i've found a workaround, but i don't think that's
right. before i call item.doInsert(), i call
item.setNew(false). This works, but my item really is
new. Can someone shed some light?
--- "shh... ." <[EMAIL PROTECTED]> wrote:
> I'm trying to insert a row, but for some reason
> torque
> is not inserting a value for the primary key. The
> schema and source code are below. It seems that
> ItemPeer builds a Criteria internally, but
> item_number
> is not added to criteria because item.isNew() ==
> true;
> Is this expected behavior?
>
> <database name="shopper">
> <table name="item" idMethod="native">
> <column name="item_number"
> size="255"
> required="true"
> primaryKey="true"
> type="VARCHAR"/>
> ...
> ...
> </table>
> </database>
>
> Item item = new Item();
> item.setItemNumber("12345");
> ItemPeer.doInsert(item);
>
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.com
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>