Hi Michael, >> SELECT personid, lastname INTO >> org.apache.jdo.tck.query.result.classes.LongString FROM >> org.apache.jdo.tck.pc.company.FullTimeEmployee >> >> Now referring to 14.6.12, the impl needs to find a constructor taking the >> expressions by position and type. It finds a constructor >> LongString(long,String) and so can use it to create a result object. Why is >> this supposed to throw an exception exactly ?
> The query has an INTO clause specifying a result class. For this > reason, the constructor LongString(long, String) should not be chosen. OK, your test is following the "rules" in the latest spec to the letter :-). I prefer to look at it from a user viewpoint. "setResultClass" is the place where the vast majority of people will specify the result class. The spec seemingly isn't allowing a user to provide a result class with the correct constructor parameters and use that to construct the object. This is a limitation that I see no obvious reason for. Is there a reason ? IMHO, the sequence should be 1. Use a constructor with the parameter positions/types. or 2. Use a default constructor 2a. public fields matching name and type 2b. public set method matching name and type 2c. public put(Object, Object) method -- Andy
