View Single Post

  #10 (permalink)  
Old 12-19-2007
Pierre Gilquin
 
Posts: n/a
Default Re: value by default 0


Yes, there is no foreign key constraints in the database. My
Object-Relationnal mapping take care of this.
So for MySql, it's just a attribute with not null constraint.

But if I insert like this :
insert into interaction (ID) values (99999999)
The interaction is created and substance1Id substance2Id are both 0 !

If I test with a simple test table, I get the correct exception (please read
my reply to Captain Paralityc)

Can the problem be from the unique key ?

Pierre

"Rik Wasmus" <luiheidsgoeroe@hotmail.com> a écrit dans le message de news:
op.t3k5d1155bnjuv@metallium.lan...
On Wed, 19 Dec 2007 14:53:35 +0100, Pierre Gilquin <inconnue@bluewin.ch>
wrote:

You have no foreign key constraints (what makes you think you do?), and
further more foreign key constraints are not supported in the MyISAM
engine, you'll probably want to convert them to InnoDB.
--
Rik Wasmus


Reply With Quote