Results 1 to 2 of 2

Thread: Criteria Query with Composite Id

  1. #1
    Join Date
    May 2006
    Posts
    142

    Default Criteria Query with Composite Id

    I have a Search screen for searching with variable number of conditions i.e. dynamically add "and condition" to where clause in the Query. Hence i am using Criteria API from Hibernate. The query works perfectly fine as criteria.list() correctly prints the no of records in the List. The problem occurs when i am trying to access the values in the Composite object having id values. It always return null value. Then i tried accessing value within the same pojo again it return the null
    Here is the pojo
    Code:
    public class DeviceSummaryView  implements java.io.Serializable {
       // Fields    
    
         private DeviceSummaryViewId id;
         private String tagNumber;
    ...
    ...
    ...
    }
    public class DeviceSummaryViewId  implements java.io.Serializable {
        // Fields    
    
         private Long deviceId;
         private long interfaceId;
         private Long ipId;
         private Long hostNameId;
    
    }
    Any pointers/suggestions highly appreciated

  2. #2
    Join Date
    May 2006
    Posts
    142

    Default

    I will appreciate any pointers/suggestions

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •