Am Mon, 5 Nov 2007 18:08:06 +0100
schrieb "Diez B. Roggisch" <[EMAIL PROTECTED]>:

> On Monday 05 November 2007 15:25:13 [EMAIL PROTECTED] wrote:
> > Hi,
> > i have 2 questions.
> >
> > 1) is there a possibiliti' to start my own (complex) sql update
> > script. example
> >
> > insert into webstats (uname,tipoctr)
> > (Select
> >         cbl.codice,
> >         1+IFNULL((select 1 from collab2 where cbl.codice =
> > collab2.codice),0)
> > from collab cbl);
> >
> >
> > 2) How can i start procedures from sqlobject.
> 
> Obtain a connection to your DB, which you should be able to using
> 
> MySQLObjectClass._connection
> 
> and then just proceed as if you were using the DB API itself.
> 
> There is no support for more in SO because calling procedures &
> running hand-tailored SQL somewhat defeats the purpose of introducing
> an ORM layer in the first place.
> 
> Be also aware of synchronisation-caveats when your procedures update
> the DB but the SO-cache doesn't reflect the changes.
> 
> Diez


i know it is not the best to use hand-tailored SQL but in some
"complicated" cases it's the only solution,

i need this to create a statistic table.

thx Mike

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to