From: Oleg B. <ph...@ph...> - 2009-02-03 10:42:58
|
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/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |