Hi,
I'm working on the new release of ColanderAlchemy ( https://github.com/stefanofontanelli/ColanderAlchemy ) which will use the new SQLA 0.8 inspection API.


The new version of CA will use 'info' kwarg which can be specified in both Column and relationship. I found also 'info' kwargs in 'sqlalchemy.orm.properties.ColumnProperty' but it is empty when I specify info as in the example below:

class Person(Base):

    __tablename__ = 'people'

    id = Column(Integer, primary_key=True)
    name = Column(Unicode(128), nullable=False)
    surname = Column(Unicode(128), nullable=False, info={'test': 'column'})
    addresses = relationship('Address', info={'test': ' relationship'})


m = inspect(Person)

print m.attrs.surname.info  --> {}
print m.attrs.surname.columns[0].info --> {'test': 'column'}
print m.attrs.addresses.info --> {'test': 'relationship'}


My questions are simple and n00b :)
1) Did you plan to populate ColumnProperty.info with the content of Column.info? 2) Is access of Column.info the right way to 'read' Column.info specified by the user in declarative example?



Best Regards,
Stefano.

--
Stefano Fontanelli
Asidev S.r.l.
Viale Rinaldo Piaggio, 32 - 56025 Pontedera (Pisa)
Tel. (+39) 333 36 53 294
Fax. (+39) 0587 97 01 20
E-mail: s.fontane...@asidev.com
Skype: stefanofontanelli
Twitter: @stefontanelli
LinkedIn: http://it.linkedin.com/in/stefanofontanelli

--
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