Am Mittwoch, 27. Juni 2007 schrieb GEDA: > Hi. I am using struts, spring and hibernate with derby. When I am reading > the table, all is well but when I'm trying to persist, the following error > occurs: > SEVERE: Table/View 'HIBERNATE_UNIQUE_KEY' does not exist > > Please help me. Is something wrong with the table I created ?
This table is used for the auto-generated identifiers:
<id name="id"><generator class="native"/></id>
and looks like this on MySQL:
+---------+---------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+---------+------+-----+---------+-------+
| next_hi | int(11) | YES | | NULL | |
+---------+---------+------+-----+---------+-------+
CREATE TABLE hibernate_unique_key (next_hi int(11));
If you set this property in your Hibernate config, then Hibernate will create
this table automagically, as well as do all other necessary modifications to
properly resemble your model:
<property name="hibernate.hbm2ddl.auto">update</property>
--
Mit freundlichen Grüßen
Kurt Huwig (Vorstand)
Telefon 0681/96751-50, Telefax 0681/96751-66
http://www.iku-ag.de/
iKu Systemhaus AG, Am Römerkastell 4, 66121 Saarbrücken
Amtsgericht: Saarbrücken, HRB 13240
Vorstand: Kurt Huwig, Andreas Niederländer
Aufsichtsratsvorsitzender: Jan Bankstahl
GnuPG 1024D/99DD9468 64B1 0C5B 82BC E16E 8940 EB6D 4C32 F908 99DD 9468
pgpLsI67AKRSw.pgp
Description: PGP signature
