Re: [SQLObject] Is SQLObject 0.7 still widely used?

2007-07-10 Thread Oleg Broytmann
On Tue, Jul 10, 2007 at 09:04:48AM -0700, Bill Campbell wrote:
> Raising hand.

   The voice counted.

> It's called inertia.

   It is to overcome. How many people will upgrade if I ask all users of
the old branch to apply all patches and run the test suit by themselves? ;)

Oleg.
-- 
 Oleg Broytmannhttp://phd.pp.ru/[EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss


Re: [SQLObject] Is SQLObject 0.7 still widely used?

2007-07-10 Thread Bill Campbell
On Tue, Jul 10, 2007, Oleg Broytmann wrote:
>Hello!
>
>   How many users of SQLObject 0.7 are here? I'd like to abandon it finally
>and ask people to upgrade to SQLObject 0.9. But if there are still many
>users who cannot upgrade by some reason (because, e.g. their Linux
>distributions still stuck with 0.7) I will continue maintaining it for
>a few additional months.

Raising hand.  It's called inertia.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:(206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

``One of the common failings among honorable people is a failure to
appreciate how thoroughly dishonorable some other people can be, and how
dangerous it is to trust them.''
- Thomas Sowell

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss


[SQLObject] Is SQLObject 0.7 still widely used?

2007-07-10 Thread Oleg Broytmann
Hello!

   How many users of SQLObject 0.7 are here? I'd like to abandon it finally
and ask people to upgrade to SQLObject 0.9. But if there are still many
users who cannot upgrade by some reason (because, e.g. their Linux
distributions still stuck with 0.7) I will continue maintaining it for
a few additional months.

Oleg.
-- 
 Oleg Broytmannhttp://phd.pp.ru/[EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss


Re: [SQLObject] The proper way to delete an instance of an SQLObject that is linked as a RelatedJoin

2007-07-10 Thread Daniel Nogradi
> > Maybe I'm misunderstanding you but if a foreignkey points to an object
> > that is deleted, the object that refers to the deleted object will not
> > be:
>
>This has nothing with RelatedJoin. You case is much simpler to fix:
>
>
> > class building( SQLObject ):
> > city = ForeignKey( 'city' )
>
> city = ForeignKey( 'city' , cascade=True)

Thanks a lot, this is really great, I didn't know about the cascade
option, I was always overriding destroySelf. And of course you are
right, this is specific to MultipleJoin and the OP was talking about
RelatedJoin.

Thanks again.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss


Re: [SQLObject] The proper way to delete an instance of an SQLObject that is linked as a RelatedJoin

2007-07-10 Thread Oleg Broytmann
On Tue, Jul 10, 2007 at 11:06:17AM +0200, Daniel Nogradi wrote:
> Maybe I'm misunderstanding you but if a foreignkey points to an object
> that is deleted, the object that refers to the deleted object will not
> be:

   This has nothing with RelatedJoin. You case is much simpler to fix:

> class building( SQLObject ):
> city = ForeignKey( 'city' )

city = ForeignKey( 'city' , cascade=True)

Oleg.
-- 
 Oleg Broytmannhttp://phd.pp.ru/[EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss


Re: [SQLObject] The proper way to delete an instance of an SQLObject that is linked as a RelatedJoin

2007-07-10 Thread Daniel Nogradi
> > Yes, you need to delete everything manually that is referenced by
> > anything that is to be deleted.
>
>No, you don't. .destroySelf() in SQLObject 0.7.2 was extended to
> automatically remove rows from the intermediate table. Does it work?

Maybe I'm misunderstanding you but if a foreignkey points to an object
that is deleted, the object that refers to the deleted object will not
be:



from sqlobject import *

sqlhub.processConnection = connectionForURI( 'sqlite:/:memory:' )

class city( SQLObject ):
buildings = MultipleJoin( 'building' )

class building( SQLObject ):
city = ForeignKey( 'city' )

city.createTable( )
building.createTable( )

c = city( )
b1 = building( city=c )
b2 = building( city=c )

c.destroySelf( )

print building.select( ).count( )
print b1.city


This will print 2 and then an SQLObjectNotFound exception will be
raised so you need to manually delete all buildings that refer to a
deleted city. I guess you had RelatedJoin in mind.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss