This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 320541 - JP QL breaks when embedded values of a Map
Summary: JP QL breaks when embedded values of a Map
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P2 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-21 14:30 EDT by Michael Keith CLA
Modified: 2022-06-09 10:24 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Keith CLA 2010-07-21 14:30:33 EDT
Consider if Entity A has a Map of embeddable B, and B has a field called "myState". Eg:

@Entity
public class A {
   ...

   @ElementCollection
   Map<String,B> myMap;
   ...
}

@Embeddable
public class B {
  ...
  String myState;
  ...
}

then the following JP QL generates an error:

select b.myState from A a join a.myMap b where KEY(b) = 'keyString'
  
See http://hwellmann.blogspot.com/2010/07/jpa-20-querying-map.html for concrete details.
Comment 1 James Sutherland CLA 2011-11-08 13:13:30 EST
Tested it and it works now.

My guess it was the same issue preventing any element collections from working that I fixed.
Comment 2 James Sutherland CLA 2011-11-16 11:20:48 EST
See, Bug#314025
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:14:23 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:24:34 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink