On Monday 13 January 2003 16:22, you wrote:
> >Aren't ChassisPool instances unique with regard to the pk?
>
> Yes, they are.  But doesn't ODMG support distinct select for specified
> fields. (eg
>
> select distinct ChassisPool.name from "+ChassisPool.class.getName();
This is what I say: in your original query there were no fields specified, so 
OJB fetched all fields and pk among them, 'disticnt' keyword does nothing.
Also I say that the CVS version of OJB now supports distinct select for 
specified fields. However note that in this case the OQL query returns a List 
of field values (if one field is specified in the SELECT list) or a List of 
Object[] instances with multiple field values (if multiple fields listed), 
I think this is in accord with ODMG spec.

Regards,
 Oleg

>
> -----Original Message-----
> From: Oleg Nitz [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 10, 2003 7:09 PM
> To: OJB Users List
> Subject: Re: Question about OQL and Distinct?
>
> Aren't ChassisPool instances unique with regard to the pk?
> Try something like
> String sql = "select distinct ChassisPool.name from
> "+ChassisPool.class.getName();
> against CVS version of OJB :-)
>
> Oleg
>
> On Friday 10 January 2003 19:46, Douglas Montanus wrote:
> > I am having problem implementing the "distinct" in my query.  I have
> > tried it many different ways but can't seem to get the result I
>
> desire.
>
> > Here is an example:
> >
> > String sql = "select distinct ChassisPool from
> > "+ChassisPool.class.getName();
> >
> > Douglas


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to