This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Hibernate gives PSQLException for polymorphic query on Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate gives PSQLException for polymorphic query on "any"" Watch "Hibernate gives PSQLException for polymorphic query on "any"" New topic
Author

Hibernate gives PSQLException for polymorphic query on "any"

John Hughes
Greenhorn

Joined: Sep 20, 2005
Posts: 2
When I try to query on an "any" association with Hibernate 3.2/PostgresQL 8.0.3 (i.e. find all objects with a certain object in one of its fields, and that field is a java interface), I get an error from inside postgres complaining that too many columns are being bound. It is very easy to reproduce with just a little code, all of which is included below. Can anyone help me get past this? I have to use an any here; I have many classes that implement many different interfaces and this is the only way to map the associations.

 
Consider Paul's rocket mass heater.
 
subject: Hibernate gives PSQLException for polymorphic query on "any"
 
jQuery in Action, 3rd edition