Go4Expert (http://www.go4expert.com/)
-   Java (http://www.go4expert.com/forums/java/)
-   -   Where clause on attribute of @collectiontable JPA (http://www.go4expert.com/forums/clause-attribute-collectiontable-jpa-t28397/)

ramandeep0015 17May2012 11:28

Where clause on attribute of @collectiontable JPA

I have table person in which i wrote the following code

public class person{

private String name;

private String lastName;

@CollectionTable(name = "PHONE")
private Set<Phone> phones;

// getters and setters


in Phone class

public class Phone{
private string number;
private String type;

getters and setter


i have to fetch person record having phone number=xxxxxxxx

Please help me!

Ramandeep Singh

All times are GMT +5.5. The time now is 16:03.