On Sun, Mar 22, 2009 at 02:54:01AM -0700, Jose San Leandro wrote:
> 
> 
> While accessing database #<MYSQL-DATABASE localhost/prj/prj OPEN
> {B8FF6D9}>
>   with expression "SELECT FILE.NAME,FILE.ID,FILE.TICKETS FROM FILE
> ORDER BY FILE.TICKETS ASC LIMIT 6 OFFSET 0":
>   Error 1054 / Unknown column 'FILE.TICKETS' in 'field list'
>   has occurred.
> 
> I just need a way to customize the generated query, in order to do
> the join myself and count the number of TICKETs pointing to each
> FILE. How can I override that query?

Use the on-query slot:

on-query        

A function designator that accepts the widget instance, as well as
sorting and pagination parameters. The function is expected to
return a properly sorted and paged sequence. The function should
also accept a :countp keyword argument. If true, the function should
return only the number of items with the given parameters, not the
actual items themselves. If this slot is NIL (the default), the
dataseq will operate on all persistent classes specified in
'data-class'. Alternatively, 'on-query' may be a list of
store-dependent keywords that will be passed to the datastore. This
may be a SQL 'where' clause, etc.

Initargs::on-query; Accessors:dataseq-on-query.

-Robin

-- 
They say:  "The first AIs will be built by the military as weapons."
And I'm thinking:  "Does it even occur to you to try for something
other than the default outcome?" -- http://shorl.com/tydruhedufogre
http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"weblocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/weblocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to