Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Inherited subtypes in collection operations?(Inherited subtypes in collection operations)
Inherited subtypes in collection operations? [message #1488677] Wed, 26 November 2014 20:44 Go to next message
Mike Summers is currently offline Mike SummersFriend
Messages: 7
Registered: November 2014
Junior Member
Inherited subtypes seem to break collection queries, this:
SELECT o FROM Job AS o WHERE o.occupation = :occupation AND o NOT IN :jobs

dies with the dread
org.postgresql.util.PSQLException: Can't infer the SQL type to use for an instance of Campaign use setObject ...


when the :jobs collection contains a Campaign, a subclass of Job.

Is this as expected or a bug?
Re: Inherited subtypes in collection operations? [message #1490912 is a reply to message #1488677] Fri, 28 November 2014 14:55 Go to previous messageGo to next message
Tomas Kraus is currently offline Tomas KrausFriend
Messages: 9
Registered: November 2014
Junior Member
Do you see the same problem on MySQL too?
This query looks bad anyway, I would expect "AND o NOT IN (a1, a2, a3, ...)". Can you have look at expanded query which goes into database? How does it look like?
Re: Inherited subtypes in collection operations? [message #1492240 is a reply to message #1490912] Sat, 29 November 2014 17:33 Go to previous message
Mike Summers is currently offline Mike SummersFriend
Messages: 7
Registered: November 2014
Junior Member
The query is correct JPA and the generated sql is also correct ( o.id NOT IN (...))

No, I haven't tried this with MySQL.
Previous Topic:Eclipselink - JPA 2.0 - Select with lockMode and maxResult doesn't work
Next Topic:EclipseLink 2.6.0 release date
Goto Forum:
  


Current Time: Sat Feb 24 13:51:17 GMT 2024

Powered by FUDForum. Page generated in 0.02334 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top