On Mon, Feb 02, 2009 at 09:39:06PM -0500, Stef Telford wrote:
> Oleg Broytmann wrote:
> > On Mon, Feb 02, 2009 at 03:07:49PM -0500, Stef Telford wrote:
> >> alias's will stay 'fixed' at webserver/framework
> >> launch .. no ?
> >
> >    Alias counter is increased on every instantiation of Alias().
> 
> Stupid question here .. but .. why ? (sorry, I know that this could be
> a large answer but..)

   Because SQLObject needs to generate unique alias names and a global
counter is the simplest way to do it. Think about joining a table with
itself - you need two different names for the table.

> Also, whilst I am here, a couple more stupid questions, is there any
> flag in the SQLObject which tells me if the object was 'created' from
> the database or instantiated from the database/cache ? I ask only
> because it would be -awfully- handy to have .. I did look at _creating
> but, that's not the right item (obviously)

   There is no and I really fail to see a difference. Why do you want to
distinguish them?

> Lastly (I promise) I am thinking of over-riding the _SO_finishCreate
> in the SQLObject subclass so that all database inserts go to the
> master rather than any slave. I would also have to override
> _SO_setValue and set (of course) .. any other methods in SQLObject
> that would have to be subclassed ?

   No, these seem to be enough.

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            p...@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to