1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Where clause on attribute of @collectiontable JPA

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

  1. ramandeep0015

    ramandeep0015 New Member

    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