Tom Lanyon ha scritto:
On 30/05/2007, at 3:39 PM, Marcello Romani wrote:
Do you also have
__PACKAGE__->set_primary_key('id');
?
You need:
- an add_column() or add_columns() line for your 'id' column
- the above set_primary_key('id') line
- the 'id' column in your database table must have its default value
set to the nextval from a sequence in the database
Hope this helps.
--
Tom Lanyon
Systems Administrator
NetSpot Pty Ltd
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/
Yes, I've probably been too concise ;-)
In fact it would be of great help to see the full source code for the
dbic-class and the db-creation script, to see where the problem lies.
I think checking if the id column is SERIAL is a good advice.
--
Marcello Romani
Responsabile IT
Ottotecnica s.r.l.
http://www.ottotecnica.com
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/