pombreda / formalchemy

Automatically exported from code.google.com/p/formalchemy
MIT License
0 stars 0 forks source link

synonyms not working? #165

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. See unit tests.

What is the expected output? What do you see instead?

I expect the model's 'foo' property to have been set via the getter/setter I 
define using SQLA's synonym functionality. Also seems to not work with the 
newish hybrid_property decorator.

What version of the product are you using? On what operating system?

SQLAlchemy-0.7.2
FormAlchemy-1.4.1
Python 2.6.6

Ubuntu 10.10

Please provide any additional information below.

See the attached unit tests.

Original issue reported on code.google.com by lionface...@gmail.com on 1 Sep 2011 at 6:05

Attachments:

GoogleCodeExporter commented 9 years ago
I'm getting the same problem.  When I try to set a hybrid_property of 
"description" which attaches to a declarative table definition of 
"_description", I get this error:
File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/formalchemy/forms.py", line 773, in __getattr__
raise AttributeError(attrname)
AttributeError: description

I've tried to find out why this doesn't work, and I think it's because, 
FieldSet.__init__'s calls to class_mapper(cls).iterate_properties don't return 
hybrid properties.

Original comment by coredump...@gmail.com on 12 Sep 2011 at 10:27

GoogleCodeExporter commented 9 years ago
Hi guys, I added a similar ticket to the current bug tracker at github (plus I 
linked to a reported solution for the problem):
https://github.com/FormAlchemy/formalchemy/issues/20

Original comment by Mariano....@gmail.com on 28 Oct 2011 at 7:55