Announcement Announcement Module
Collapse
No announcement yet.
Criteria query.list() returns results but item in the List is null Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Criteria query.list() returns results but item in the List is null

    Criteria query.list() returns results as expected but the item in the List is null when working with pojo having composite key .
    But if i remove the composite key and make the dataId field be the key the
    problem was resolved (both query and criteria work).

    Here is the code snippet with composite key

    Code:
    public class DeviceSummaryView  implements java.io.Serializable {
       // Fields    
    
         private DeviceSummaryViewId id; //Composite Key
         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 to make Criteria query work with Composite key will be highly appreciated

    Regards
    Bansi
Working...
X