You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Tino Schöllhorn <t....@tiscali.de> on 2004/02/14 11:49:35 UTC
QueryFactory issue
Hi,
I could pinpoint the described error which has been described in an
earliear thread (Cache issue: 13.2.2004). It all boils to the
QueryFactory.newQuery(Class, Criteria, boolean) method. if I execute the
code to retrieve an instance of class Person with:
Criteria crit = new Criteria();
crit.addEqualTo("id", "85");
Query query = QueryFactory.newQuery(Person.class, crit);
Collection c = pb.getCollectionByQuery(query);
.... and so on
everything works perfectly and the instances of Person are instantiated
correctly. But if I use the method described in the first place:
Criteria crit = new Criteria();
crit.addEqualTo("id", "85");
Query query = QueryFactory.newQuery(Person.class, crit, true);
After that query the LONGVARCHARS aren't correctly instantiated.
I think that this might be an error of OJB.
With regards
Tino
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: QueryFactory issue
Posted by Tino Schöllhorn <t....@tiscali.de>.
Hi,
sorry I got it. It is a database-error. Access doesn't return memo
fields when using distinct (grrrr....). my fault.
tino
Tino Schöllhorn wrote:
> Hi,
>
> I could pinpoint the described error which has been described in an
> earliear thread (Cache issue: 13.2.2004). It all boils to the
> QueryFactory.newQuery(Class, Criteria, boolean) method. if I execute the
> code to retrieve an instance of class Person with:
>
> Criteria crit = new Criteria();
> crit.addEqualTo("id", "85");
> Query query = QueryFactory.newQuery(Person.class, crit);
>
> Collection c = pb.getCollectionByQuery(query);
> .... and so on
>
> everything works perfectly and the instances of Person are instantiated
> correctly. But if I use the method described in the first place:
>
> Criteria crit = new Criteria();
> crit.addEqualTo("id", "85");
> Query query = QueryFactory.newQuery(Person.class, crit, true);
>
> After that query the LONGVARCHARS aren't correctly instantiated.
>
> I think that this might be an error of OJB.
>
> With regards
> Tino
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org