[sqlalchemy] Select NULL

2011-04-09 Thread jerryji
This is a duplicate of my stackoverflow question -- http://stackoverflow.com/questions/5602918/postgresql-select-null-values-in-sqlalchemy Basically I have a (PostgreSQL) table -- test= create table people (name varchar primary key, marriage_status varchar) ; test= insert into people values

Re: [sqlalchemy] Select NULL

2011-04-09 Thread Mike Conley
Use people.married_status == None to check for NULL -- Mike Conley -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to

[sqlalchemy] Execute a function on orphan

2011-04-09 Thread Hector Blanco
Hello everyone! I have an application with Users and UserGroups... The users have certain permissions to do stuff in the application depending on the UserGroup they belong to. The relationship is as follows: -- class User(BaseClass.BaseClass, Database.Base):

[sqlalchemy] Re: when using sqlachemy autoload feature with oracle table column name coming in lower case even if in DB it is in upper case

2011-04-09 Thread Anoop
HI Michael , Thanks for your reply,this is my table creation query without any quoted variables CREATE TABLE AUTOLOAD_TEST ( ID INTEGER , FIRST_NAME VARCHAR(20) ); this is my connect_sqlalchemy.py script ++ from sqlalchemy import

Re: [sqlalchemy] Execute a function on orphan

2011-04-09 Thread Mike Conley
Not sure I understand the use case example. With these tables, doesn't the act of an administrator unassigning a user from its UserGroup set the group id column to NULL? If so, doesn't that effectively remove all the permissions because there is no longer a connection between the user and the

Re: [sqlalchemy] Execute a function on orphan

2011-04-09 Thread Hector Blanco
Unassigning a user from its userGroup, indeed, puts the UserGroup in that user to NULL. But it turns out that the entity that controls the permissions is a third thing. That thing takes some fields of the User class (id, name...) and generates an instance of a third object which is in charge of

Re: [sqlalchemy] Execute a function on orphan

2011-04-09 Thread Michael Trier
On Sat, Apr 9, 2011 at 10:32 PM, Hector Blanco white.li...@gmail.comwrote: Unassigning a user from its userGroup, indeed, puts the UserGroup in that user to NULL. But it turns out that the entity that controls the permissions is a third thing. That thing takes some fields of the User class