On Jan 4, 2006, at 11:51 AM, Tomi NA wrote:
>
> Thank you for the idea: I'll consider it when I get to that point.
> Meanwhile, I'm stuck.
> I can't insert anything into any table whose primary key is an
> autoincrement. This is a bit frustrating, I must admit. I have the
> same results for 1.2M4, 1.2M8 and the latest nightly build:
>
> java.sql.SQLException: Cannot insert explicit value for identity
> column in table 'Product' when IDENTITY_INSERT is set to OFF
>
> I'll give it one more go every way I know how and see what happens.
But that's an entirely different problem ;-) From the error message I
assume you are on SQLServer. You need to (a) check that you have the
right DbAdapter for your DB (since recently, you can simply delete
any adapter info and let Cayenne guess it) and (b) your PK column set
as "generated" (in M9, entity PK generation Strategy in the Modeler
should be set to "Database Generated"):
http://objectstyle.org/confluence/display/CAY/Generated+Columns
Andrus
This archive was generated by hypermail 2.0.0 : Wed Jan 04 2006 - 12:22:15 EST