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 Lennart Benoot <lb...@axelera.net> on 2003/03/04 18:23:13 UTC

JDO to OJB xsl

Hey all,

Does anyone have or is in the process of creating an xsl script to 
translate JDO xml configuration files into OJB configuration files?

Regards,
Lennart


Possible Broker query bug?

Posted by "V.B. Skrypnyk" <va...@skrypnyk.net>.
I come across the following situation with PersistenceBroker queries:

Here is my object
public class Customer {
    ...
    private List acls = new Vector();
    private String realm = "...";
}

acls is a collection with Acl as collection member.

This is the query

Criteria crit = new Criteria();
crit.addEqualTo( "oid", new Long(201));
crit.addLike( "realm", "/201*" );
Criteria or = new Criteria();
or.addEqualTo( "acls.user_FK", new Long( 1 ) ); // notice the reference
field
crit.addOrCriteria( or );

Resulting sql statement is:
SELECT ... FROM customers A0 INNER JOIN acls A1 ON A0.cus_oid=A1.acl_eid
WHERE (A0.cus_oid =  '201' ) AND A0.cus_realm LIKE  '/201%'  OR  (A1.acl_uid
IN ( '1' ))

The sql statement comes out quite well constructed, except for one thing. It
uses inner join which means that my OR condition in which I refer to a
reference field effectually becomes an AND condition. Shouldn't the
statement contain rather left join in this case?

Cheers,
--Bill.