On Mon, Jul 7, 2008 at 1:33 PM, Justin Warren <[EMAIL PROTECTED]> wrote:
> Hi folks,
>
> I'm new to Storm, by way of Twisted, and so far I like what I see! I
> look forward to playing more with DeferredStore sometime soon.
>
> My question: When defining a Storm subclass, is it possible to define
> the database column to use for the Property, rather than having it
> automagically use the name of the class attribute? Something like the
> following syntax (which doesn't work):
>
> class Person(Storm):
>    """
>    My Person class, linked to an existing database schema
>    """
>    id = Int()
>    name = Unicode()
>    # I want to use Person.surname, not Person.person_lastname
>    surname = Unicode(column='person_lastname')

The following should do what you want:
    surname = Unicode('person_lastname')

James.

-- 
storm mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/storm

Reply via email to