11 messages in com.googlegroups.sqlalchemy[sqlalchemy] Re: Making it possible t...| From | Sent On | Attachments |
|---|---|---|
| andresj | 22 Dec 2007 15:38 | |
| Michael Bayer | 22 Dec 2007 17:07 | |
| andresj | 22 Dec 2007 17:59 | |
| Michael Bayer | 22 Dec 2007 18:48 | |
| andresj | 22 Dec 2007 19:37 | |
| andresj | 02 Jan 2008 16:56 | |
| Michael Bayer | 02 Jan 2008 17:27 | |
| andresj | 02 Jan 2008 17:52 | |
| Michael Bayer | 02 Jan 2008 18:39 | |
| andresj | 02 Jan 2008 20:08 | |
| andresj | 03 Jan 2008 12:13 |
| Subject: | [sqlalchemy] Re: Making it possible to use custom properties in query.filter expressions.![]() |
|---|---|
| From: | Michael Bayer (mike...@zzzcomputing.com) |
| Date: | 12/22/2007 06:48:15 PM |
| List: | com.googlegroups.sqlalchemy |
On Dec 22, 2007, at 9:00 PM, andresj wrote:
On Dec 22, 5:07 pm, Michael Bayer <mike...@zzzcomputing.com> wrote:
a synonym() is used so that your attributes are properly available in filter(). This functionality has been vastly improved in the current SVN trunk which resolves all the issues you outline above, and will be available in release 0.4.2. If you checkout the SVN trunk, you can do:
class MyAddress(object): def _set_email(self, email): self._email = email def _get_email(self): return self._email email = property(_get_email, _set_email)
mapper(MyAddress, addresses_table, properties = { 'email':synonym('_email', map_column=True) })
which automatically maps the column to the "_email" attribute, and also instruments the "email" property with the SQL comparator methods.
Thank's for the info, but is SVN ready for production use (kinda like Django's SVN, which is recommended by Django)? I mean, can I use it for my real-world projects without fearing that in any moment it will not work? And in any case, do you know when is 0.4.2 scheduled to come?
0.4.2 is ready to go out within the next week. the SVN trunk is typically pretty stable and SQLAlchemy puts out a new release from the trunk about once a month. I'd classify the general stability of the trunk as "beta" since there are new features and changes on an almost daily basis, so its not like things can't go wrong, but we always keep the full suite of unit tests passing in trunk; to view the status of the tests you can view http://pylonshq.com:8012/ .
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to sqla...@googlegroups.com
To unsubscribe from this group, send email to
sqla...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---




