[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
[eclipselink-users] Querying @BasicMap values?
|
- From: Ari Heino <ext.ari.heino@xxxxxxxxx>
- Date: Mon, 12 Oct 2009 01:39:57 -0700 (PDT)
- Delivered-to: eclipselink-users@eclipse.org
Hi!
Tried to search answer for this one and found none yet.
So... I would need to find entity that has a certain value inside the
hashmap defined with @BasicMap . How would that kind of query look like in
eclipselink QL?
Entity in question:
@Entity
@Table(name = "CONTAINER_METADATA", uniqueConstraints = {
@UniqueConstraint(columnNames = { "name" }) })
public class Container
implements Serializable {
@Id
@GeneratedValue
private Long id;
@Basic
private String name;
@BasicMap(fetch = FetchType.EAGER, keyColumn = @Column(name = "MAPKEY",
length = 256, unique = true), valueColumn = @Column(name = "MAPVALUE",
length = 3999))
@CollectionTable(name = "CONTAINER_ARBITRARY_METADATA",
primaryKeyJoinColumns = { @PrimaryKeyJoinColumn(name = "CONTAINER_ID") })
private Map<String, String> metadatas;
.... getters and setters
}
--
View this message in context: http://www.nabble.com/Querying-%40BasicMap-values--tp25852247p25852247.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.