Re: [ojb-users] Does getCollectionByQuery() with QueryByExample argument works?
Brought to you by:
thma
From: <Ste...@eu...> - 2002-06-05 09:01:32
|
Yes, getObjectByQuery() work OK but it returns only one object, but I = want to find Collection of object that fulfill conditions defined by "ExampleObject". We found it very flexibly to use "ObjectByExample" idea in our previous= project (Toplink) to simplify finders API. Tnx, Stefan |--------+----------------------------------------------> | | "Jakob Braeuchi" | | | <jbr...@ho...> | | | Odeslal: | | | obj...@li...urc| | | eforge.net | | | 04.06.2002 19:11 | | | | |--------+----------------------------------------------> >--------------------------------------------------------------------= ----------------------------| | = | | Komu: <obj...@li...>, <Stefan_T= am...@eu...> | | Kopie: = | | P=F8edm=ECt: Re: [ojb-users] Does getCollectionByQuery() = with QueryByExample argument | | works? = | | = | | = | >--------------------------------------------------------------------= ----------------------------| hi stefan, have you tried getObjectByQuery() ? hth jakob ----- Original Message ----- From: <Ste...@eu...> To: <obj...@li...> Sent: Tuesday, June 04, 2002 5:50 PM Subject: [ojb-users] Does getCollectionByQuery() with QueryByExample argument works? > What I do wrong? > > I call find() method with persistant object with id attribute (primar= y key) > set only (all other attributes are null or 0). There is no unittest w= ith > such functionality. > > public Collection find(Object object) { > Query query =3D new QueryByExample(object); > return broker.getCollectionByQuery(query); > } > > It returns collection of all objects from DB. > > Tnx Stefan > > P.S. I have ojb 0.9 > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cf= m > > _______________________________________________ > Objectbridge-users mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-users > _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm _______________________________________________ Objectbridge-users mailing list Obj...@li... https://lists.sourceforge.net/lists/listinfo/objectbridge-users = |