Hi All,

I have the following table:

CREATE TABLE `ip` (
  `email` varchar(50) NOT NULL,
  `ip` varchar(15) NOT NULL,
  PRIMARY KEY (`email`,`ip`),
)

...which I'm looking to map to the following class:

class User:

  def __init__(self,email,*ips):
     self.email=email
     self.ips = ips

So, multiple rows in the `ip` table end up mapping to a single user objects. (ie: I end up with a sequence of ip addresses on user object)

How do I do it?

cheers,

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
           - http://www.simplistix.co.uk

--
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to