aspose file tools*
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
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.

 
Don't get me started about those stupid light bulbs.
 
subject: Hibernate gives PSQLException for polymorphic query on "any"