On Tue, 18 Jul 2006, CIJOML wrote:

newKontakt.setId_lokace('4');

<snip/>

 Detail: Key (lokace_id_lokace)=(52) is not present in table "lokace".
Caused by: org.postgresql.util.PSQLException: ERROR: insert or update on table "kontakt" violates foreign key constraint "kontakt_lokace_id_lokace_fkey"

<snip/>

So time is OK, but when inserting, it looks for line 52?! I inserted line 4 in lokace_id!!!

Any fix? Explanation?

'4' != 4

'4' is an ASCII charcter with decimal value 52.

Your value is converted from a charcter to an integer.

--
Graeme -

Reply via email to