>> Apparently, Person.full_name receives a class as an argument instead 
>> of an instance. Is there other way?
>
>That's what you want in this case, that this hybrid property would get a 
>class, because Query works with classes.  Try adding echo=True to
create_engine() to see the actual SQL emitted, it should be correct.

No, that's definitely not what I want. My hybrid property relies on a content 
of an instance to return a value, so it needs that 'self' parameter to be an 
instance.


>In your example you forgot to add newly created p object to a session:
>
>s.add(p)
>s.commit()
>Your Person class is missing __tablename__ as well.

No, these parts were omitted while copying the code.

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