Hi,
I'm using Hibernate 3.3.1 and Hibernate-Annotations 3.4.0 and Postgres 8.4. I stumbled upon a problem where my queries were resulting in
Code:
Caused by: org.postgresql.util.PSQLException: ERROR: relation "resource" does not exist
Once I added
Quote:
<property name="hibernate.default_schema">smd</property>
to my configuration most problems went away. However, I see I'm still having problems with some queries involving many to one relationships.
Code:
select resourceit0_.CONFIG_ID as CONFIG1_1_, resourceit0_.RES_ID as RES2_1_, (select a12.URI from RESOURCE a12 where a12.ID=resourceit0_.RES_ID) as formula1_1_, resourceit1_.ID as ID5_0_, resourceit1_.description as descript2_5_0_, resourceit1_.INPUT_REF as INPUT3_5_0_, resourceit1_.name as name5_0_, resourceit1_.size as size5_0_, resourceit1_.SRC_URI as SRC6_5_0_, resourceit1_.status as status5_0_, resourceit1_.STATUS_MSG as STATUS8_5_0_, resourceit1_.type as type5_0_, resourceit1_.URI as URI5_0_ from smd.RESOURCE_SIM_CONFIG resourceit0_ left outer join smd.RESOURCE resourceit1_ on resourceit0_.RES_ID=resourceit1_.ID where resourceit0_.CONFIG_ID=?
You can see that the inner select
Quote:
(select a12.URI from RESOURCE a12 where a12.ID=resourceit0_.RES_ID)
is not prefixed appropriately with "smd."
What should I do?
Thanks, Jason