» DaoGen Forums
» Foreign key constraint in create()
Foreign key constraint in create()
Posted by Gu Gu 28.02.2008 21:02
My table have 2 FKs (which are INT and allowed NULL) refering bak to its own PK. When I insert a new row to the database without specifying any FK then the create() statement will actually put 0 in place of what should be null and thus triggering a foreign key constraint error. Coz 0 never appears in my PK column which is auto generated and auto increased.
Any idea to solve this?
thx n regards