On Tue, Feb 11, 2003 at 07:21:06AM +0100, Stefan Schl�sser wrote:
> Hi,
> 
> I would like to use sql functions such as min and max for an SQL 
> query.
> 
> I used the queryFactory create ( .. sql) method. This does require a 
> class AND a table name specified in the from clause. Why is this so ?
> 
> I would not want to specify the table name since this is something 
> done via the mapping file supplied to OJB. 
> 
> In addition my query 
> "select max(starttime) from Appointment" results in null when
> launched via the  broker.getObjectByQuery( q ); interface. The query 
> succeeds when posted via an SQL client.
> 
> What is the correct way to do such sql functions ?

I don't know if this is possible with Ojb at all, since the query you
mention has nothing to do with object mapping, it just returns a single
value.
I usually use plain jdbc for such queries.


hth,
Jens


--
Jens Kraemer
[EMAIL PROTECTED]

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

Reply via email to