Hi Oleg,

On Tue, Dec 16, 2008 at 02:54:26PM +0300, Oleg Broytmann wrote:
> On Tue, Dec 16, 2008 at 12:50:46PM +1100, Emmanuel Galanos wrote:
> 
> > Unfortunately self.id is not available until after the object is
> > created.
> 
>    Certainly it is not available. But perhaps you want to set some values
> without touching the id?

For the magic attribute, I need a unique identifier so that the
external data can reference the SQL object. The id column would appear
to be the obvious choice as is seen in the example at:
        http://sqlobject.org/SQLObject.html#adding-magic-attributes-properties

Ideally SQLObject would either determine the id before row insertion
(e.g. in PostgreSQL select nextval('blah_id_seq');) or defer setting
of magic attributes until after the row is inserted.

I imagine that deferring the setting would be the easiest method
with respect to database compatibility and would have better
performance.

What do you think ?

Regards,

Emmanuel

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to