Where clause on attribute of @collectiontable JPA

Discussion in 'Java' started by ramandeep0015, May 17, 2012.

  1. ramandeep0015

    ramandeep0015 New Member

    Joined:
    May 17, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi


    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

    @Embeddable
    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!

    Thanks
    Ramandeep Singh
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice