Take in consideration fields with null value. Test <> ou = cannot be
correctly done with nulls.

In this case you have to write : A isNull OR A<>B

or A NotNULL AND A==B

Hope this may help you.

Regards.


On 4/13/06, Helder Gaspar Rodrigues <[EMAIL PROTECTED]> wrote:
>
> Hello everyone, i know that maybe this ml is not the appropriate local
> to ask this, but im so desperated that i have to try.
>
> Im using OJB in a java project, and now i want to query the objects
> using odmg OQL query.
>
> Imagine class A and B. A has a set of B objets assigned into the
> variable bs.
>
> B object have a variable called date with type java.util.Date;
>
> I want to retrieve all objects A that not match with the variable date
> in all objects B in the set bs.
>
> Example:
>
> String oqlQuery = "select a from " + A.class.getName();
> oqlQuery += " where name = $1 and bs.data <> $2";
>
>
> the problem is if there is any B in the bs that do not match the "<>"
> the respective object A that contains that B object is putted in the
> result.
>
> I dont want that, i want: If there is any B in the bs set that match
> "<>" object A is not considerated.
>
>
> Any tips?
>
> Thank you a lot for your attention!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to