This content has been marked as final.
Show 4 replies
-
1. Re: Entity views with postgres
trunikov.dmitry.trunikov.zoral.com.ua Nov 11, 2008 12:06 PM (in response to micayael)May be you should add an attribute 'schema'.
@Entity @Table(name = "usr", schema = "public", uniqueConstraints = @UniqueConstraint(columnNames = "uname")) ...
-
2. Re: Entity views with postgres
micayael Nov 11, 2008 2:20 PM (in response to micayael)I got the same error: table not found.
I found this url http://www.guj.com.br/posts/list/75664.java
Here said that I have to delete the line <property name="hibernate.hbm2ddl.auto" value="validate"/> of the persistence.xml.
But, is this correct? -
3. Re: Entity views with postgres
stefanotravelli Nov 11, 2008 7:28 PM (in response to micayael)If you want Seam (that is Hibernate) to create your database schema you have to set that parameter to 'update' or 'create':
<property name="hibernate.hbm2ddl.auto" value="update"/>
Setting to 'validate' it just... well, validate, and the result of the validation is that the table doesn't exist.
-
4. Re: Entity views with postgres
www.supernovasoftware.com Nov 11, 2008 7:37 PM (in response to micayael)If you are trying to map a view you must upgrade hibernate to 3.2.6.
I had to do this in order to keep validate on due to the way postgres reports tables.
I have seen no problems by upgrading JBAS 4.2.3 to this version of hibernate.
Specifically I had to copy the relevant versions of 3.2.6 jars
hibernate3.jar hibernate-annotations.jar hibernate-commons-annotations.jar hibernate-entitymanager.jar hibernate-validator.jar
to
/jboss-4.2.3.GA/server/default/lib