The code itself is quite long but I am just trying to query this object. Originally I create a Claim and set a bunch of parameters, I then want to look up a PartsCode via it's code to add to it so I do:
Code:
Criteria crit = getSession().createCriteria(ClaimLine.class);
crit.add((Expression.eq(PartsCode.FIELD_CODE, webCharge.getPartCode()));
List results = crit.list();
This is the line I get the exception on.
The Claim has an AssessmentClaim which has an Assessments. The Assessments then have many ClaimLineDeficiencies. Each ClaimLineDeficiency belongs to a ClaimLine which has many ClaimLineCharges. A ClaimLineCharge may have an associated PartsCode. I have added all other stages to the Claim (either by adding them without getting them from the database as they are not yet in there, or by looking them up with a get) and am now attempting to lookup the PartsCode to add to the ClaimLineCharge. It's when trying to get the part code by criteria that I get the problem. As I previously mentioned if I can get() one by id but I only know the code at this time.
Is this sufficient detail? I know these not much in there but it’s a complex relationship and so putting more detail in would take forever unless I knew what kind of detail you’re looking for.
Thanks.
Sam