Mike Kienenberger <mkienen..laska.net> wrote:
> I'm seeing my primary key set to NULL when I try to commitChanges a new
LOG
> object.
This was a case of user error. I had read that primary key generation
worked differently in Cayenne than in EOF, but I didn't notice a conflict in
my model.
I had an object (class) attribute defined for my logging table's primary
key, which as documented, causes automatic primary key generation to be
ignored.
I'm not entirely convinced that this is a good design since there are cases
where you need to automatically generate "meaningful" (once they're
generated) primary keys.
For example, invoice numbers. I suppose it could be done with some
database-specific SQL or stored procedure, but that defeats the purpose of a
database layer product.
-Mike
This archive was generated by hypermail 2.0.0 : Wed Sep 10 2003 - 11:29:38 EDT