Unfortunately, I am unfamiliar with struts and spring - I am using JBoss Seam. If you are using plain Hibernate, here is where to put it:
http://www.hibernate.org/hib_docs/v3/reference/en/html/tutorial.html#tutorial-firstapp-configuration or here http://www.hibernate.org/hib_docs/v3/reference/en/html/session-configuration.html Am Mittwoch, 27. Juni 2007 schrieb GEDA: > I am sorry but I am a newbie in using hibernate + struts + spring > > Can you tell me please where actually do I have to insert the line with the > property and in which file ? > Should I put it in the datasource bean or th entitymanager bean in the > applicationContext.xml ? > > Kurt Huwig wrote: > > 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 -- 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
pgpVgwjTMTSDx.pgp
Description: PGP signature
