root / elixir / trunk / CHANGES @ 322

Revision 322, 14.1 kB (checked in by ged, 5 years ago)

- Added two new methods on the base entity: from_dict and to_dict, which can

be used to create (or output) a whole hierarchy of instances from (to) a
simple JSON-like dictionary notation (patch from Paul Johnston,
closes ticket #40).

Line 
10.5.3
2
3New features:
4- Added two new methods on the base entity: from_dict and to_dict, which can
5  be used to create (or output) a whole hierarchy of instances from (to) a
6  simple JSON-like dictionary notation (patch from Paul Johnston,
7  closes ticket #40).
8
9Bug fixes:
10- Fixed multi-table inheritance when using a non default schema (closes #38)
11- Fixed ManyToOne relationships using 'key' kwarg in their column_kwargs
12  (patch by Jason R. Coombs)
13
140.5.2 - 2008-03-28
15
16New features:
17- Added an optional `check_concurrency` keyword argument to the versioning
18  extension, supporting the usage of SQLAlchemy's built-in optimistic
19  concurrency check.
20
21Changes:
22- Made Elixir python 2.3 compatible again (based on patches from
23  Jason R. Coombs)
24
25Bug fixes:
26- Fixed act_as_list extension to work with DBMS that require subselects to be
27  aliased (patch by Alice McGregor)
28- Fixed the versioning extension so that the history table is updated within
29  the current transaction (patch from and closes ticket #35).
30
310.5.1 - 2008-02-07
32
33New features:
34- Added a new elixir plugin for managing entities as (ordered) lists.
35- Added a `column_format` keyword argument to `ManyToMany` which can be used
36  to specify an alternate format string for column names in the mapping table.
37- Added support for custom base classes which inherit from another class (ie
38  not directly from object).
39- Added an alternate (nicer) syntax to define synonym properties.  This syntax
40  has a more limited scope, except that it can refer to properties defined in
41  a parent entity. This is based on a patch from Alexandre da Silva.
42
43Changes:
44- Added check so that using an inexisting column in an order_by or other
45  column-name based argument raises an exception.
46- The polymorphic_identity kwarg in using_mapper_options is not overriden
47  anymore by the one generated by Elixir (patch from Ben Bangert).
48- Moved the format of the multi-table inheritance column to a constant in
49  options (so that it can be changed globally).
50- The foreign key constraint of the column in a multi-table inheritance is
51  configured with a cascade rule.
52
53Bug fixes:
54- A child entity doesn't inherit anymore its parent entity statements (such as
55  options) if it doesn't use any statement itself.
56- Made inheritance work for custom base classes (closes #25).
57- Fixed the inverse relationship matching when the inverse relationship is
58  defined in a parent Entity (thanks to Alexandre da Silva).
59- Fixed bug in setup_entities (it always used the global entity list and not
60  the list given as argument).
61- Fixed the versioning extension not appropriately handling versioned
62  entities with onupdate events (patch from Remi Jolin, closes #29).
63- Fixed videostore example (patch from Jason R. Coombs, closes #31).
64
650.5.0 - 2007-12-08
66
67Please see http://elixir.ematia.de/trac/wiki/Migrate04to05 for detailed
68upgrade notes.
69
70New features:
71- Added set method on base Entity (set attributes using kwargs)
72
73Changes:
74- Autosetup defaults to False ! (please look at those upgrade notes!)
75- Polymorphic defaults to True (inheritance is polymorphic by default).
76- Removed one of the autosetup triggers altogether: there is no "fake" mapper
77  registered in SQLAlchemy's mapper_registry anymore, so if you try to
78  access the class mapper directly (not through the 'mapper' attribute on
79  the class), before the setup phase happens, it won't work. This was done
80  because of a change in SQLAlchemy trunk (future SA 0.4.2) which broke that
81  piece of code (and prevented to use autosetup at all). Since that code
82  was a hack in the first place, instead of doing some even uglier hackery,
83  I got rid of it altogether.
84- Moved some format strings to constants in options, so that one can change
85  them if he wants to.
86- Allow overriding primary_key columns on autoloaded entities (closes tickets
87  #20 and #22)
88- Columns created by ManyToOne relationships can now optionally (through
89  column_kwargs) *not* create an index (ie it's not harcoded anymore).
90  Suggestion by Jason R. Coombs.
91
92Bug fixes:
93- Fixed a nasty bug which prevented inheritance to work correctly when using
94  the attribute syntax in many cases.
95- Fixed associable extension to work with SQLAlchemy trunk (future 0.4.2).
96- Fixed an incompatibility with zope.interfaces.
97- Tweaked the initialization sequence again (in fact revert an older change)
98  which prevented to reuse class properties of one class in other (subsequent)
99  classes.
100- Fixed our tests to work with SA trunk (future 0.4.2) (unicode data + use of
101  deprecated attributes)
102
1030.4.0 - 2007-10-29
104
105Please see http://elixir.ematia.de/trac/wiki/Migrate03to04 for detailed
106upgrade notes.
107
108New features:
109- Implemented a new syntax to declare fields and relationships, much closer to
110  what is found in other Python ORM's. The with_fields syntax is now
111  deprecated in favor of a that new syntax. The old statement based (has_field
112  et al.) syntax is still available though (and will remain so for quite some
113  time). This was done with help from a patch by Adam Gomaa.
114- Implemented polymorphic single-table inheritance as well as polymorphic and
115  non-polymorphic multi-table (aka joined table) inheritance.
116- Added ext sub-package for additional Elixir statements.
117- Added associable extension for generating polymorphic associations with
118  Elixir statements.
119- Added versioning extension to keep track to all changes to your entities by
120  storing them in a secondary table.
121- Added encryption extenstion to encrypt/decrypt some fields data on the fly
122  when writing to/reading from the database.
123- Added support for synonym properties.
124- Added shortcut syntax to define column_properties.
125- Added a .query attribute on all entities. The old .query() syntax is still
126  available.
127- Added support to add any SQLAlchemy property on your mapper, through the
128  GenericProperty class (as well as the has_property statement). These can
129  work even if they rely on the entity columns (an thus need them to be
130  defined before the property can be declared). See tests/test_properties.py
131  for examples.
132- Added support for "manual session management" (ie you can now define an
133  entity with "using_options(session=None)" and it won't use any
134  SessionContext extension, nor receive the "query" attribute.
135- Made the statement system more powerfull.
136
137Changes:
138- The setup time was changed. That is the table and mapper are not created as
139  soon as the class is defined, but rather when first used, or when explicitly
140  calling the setup function (recommended). This also allowed us to reorder
141  the setup process and allows, among others to use a ManyToOne-generated
142  column as a primary key, to use unique constraints on those columns, to
143  order by those columns and so on...
144- Made Elixir work with both SQLAlchemy 0.4 and 0.3.10 (with help from a patch
145  by Ants Aasma).
146- Moved away from assign_mapper, now all assign_mapper-provided methods are on
147  the Entity class. Now, if people don't like them, they have the option to
148  simply provide another base class.
149- Default objectstore is now a ScopedSession when working on SQLAlchemy 0.4.
150  It means that it's not wrapped in an Objectstore object at all. This means,
151  that depending on the version of SA you are using, you'll get a slightly
152  different behavior.
153- Relationships to other classes can now also be defined using the classes
154  themselves in addition to the class namees. Obviously, this doesn't work for
155  forward references.
156- Classes defined inside a function can now have relationships to each other.
157- Added default __init__ method on entities so that subclasses can override it
158  and still have the "set attribute by keyword" behavior by calling super()
159- Added "through" and "via" keyword arguments on relationships and has_field
160  statement, to proxy values through relationships (uses association_proxy)
161- Made EntityMeta public, so that people can actually define their own base
162  class.
163- Changed the order of relationship kwargs processing so that computed kwargs
164  can be overridden by kwargs manually passed to the statement. This should
165  only be used if you know what you are doing.
166- Added onupdate kwarg to BelongsTo relationships for consistency with the
167  ondelete kwarg
168- Added ondelete and onupdate kwargs for use with has_and_belongs_to_many
169  to apply on delete clauses to foreign key constraints on the m2m table.
170- Columns of the intermediary table of an has_and_belongs_to_many relationship
171  are now marked as primary keys.
172- Reworked how entities look for primary keys on related entities. This
173  enables one "normal" entity (fully defined in Elixir) to refer to an entity
174  which is autoloaded.
175- Added translation (from column name to column object) of the primary_key
176  mapper option so that it can actually be used. This allows to have entities
177  without any primary key defined at the table level.
178- Added the possibility to give a custom name for ManyToOne constraints
179  (patch from and closes ticket #16)
180- Dropped support for the old threadlocal SA extension (which doesn't even exist
181  anymore in SA 0.4)
182
183Bug fixes:
184- Reworked/cleaned tests so that they don't leak stuff to other tests (both at
185  the method level and module level) anymore. Uses nosetest's module level
186  fixture.
187- Fixed relationships to entities whose primary_key field has been defined
188  with a "key" argument (based on a patch by Paul Johnston).
189- Fixed some buggy tests.
190- Fixed relationships to tables using a schema (patch by Neil Blakey-Milner)
191- Made inverse relationships use backrefs. This fixes the "bidirectional
192  coherency" problem some people had before doing a flush. (based on a patch
193  from Remi Jolin).
194
1950.3.0 - 2007-03-27
196- Made the provided metadata not threadlocal. This could break things for you
197  in some rare case. Please see the (newly created) FAQ file for details about
198  this.
199- Added support for autoloading/reflecting databases with
200  has_and_belongs_to_many relationships. The tablename argument is now
201  optional, but still recommended, otherwise you'll have to use the same exact
202  name for your intermediary table than the one generated. You also _have to_
203  specify at least one of either local_side or remote_side argument.
204- Added support for the "version_id_col" option on entities. This option adds
205  a column to the table which will be used to prevent concurrent modifications
206  on any row of the entity's table (i.e. it will raise an error if it happens).
207- Made the colname argument optional for belongs_to relationships in
208  autoloaded entities. It is only required to specify it if you have several
209  belongs_to relationships between two entities/tables.
210- Applied patch from "Wavy" so that columns of a table are in the same order
211  as they were declared (this only works for the has_field statement).
212- Applied patch from Isaac Csandl to add an "ondelete" argument to
213  belongs_to relationships. The content of that argument is forwarded to the
214  foreign key constraint.
215- Foreign key names generated by belongs_to relationships use column names
216  instead of relation names in case we have a relation with the same name
217  defined in several entities inheriting from the same entity using single-
218  table inheritance (and we set a custom column name in one of them to avoid
219  a column-name conflict).
220- Using invalid options on entities will now raise an exception
221- Added __version__
222- Use an explicit metaclass for entities, so that people can define their own
223  base class.
224- Changed the approach to reflecting/autoloading belongs_to relationships.
225  This shouldn't change anything to how it's used but allowed me to factor
226  some code with has_and_belongs_to_many relationships.
227- The tablename option can now be given a callable so that people can provide
228  their own function to get the table name for an entity. The tablename option
229  can now also be set globally (using the options_defaults dictionary). Of
230  course, this only makes sense for the callable usecase.
231
232- Fixed bug preventing having entities without any statement.
233- Fixed documentation for belongs_to relationships (the arguemnt is "required",
234  not "nullable").
235- Fixed typo which broke the use_alter argument on belongs_to relationships.
236- Fixed inheritance unit test to pass SQLAlchemy type check on relations
237  (introduced in SA 0.3.6)
238- Fixed wrong field length in autoload test (it was not noticeable with sqlite).
239- Actually make the code python 2.3 compatible (Robin's patch was based on
240  0.1.0 while I had introduced more decorators in the trunk in the mean time).
241
242- Made some PEP8 tweaks in many places. Used the pep8 script provided with
243  Cheesecake.
244- Some cleanup/useless code removal
245
2460.2.0 - 2007-02-28
247- Applied patch from Robin Munn to make the code python 2.3 compatible
248- Per a suggestion on the mailing list, look at the calling stack frame to
249  ensure that we apply statements to the proper class.  We now attach the
250  statement list to the class itself, rather than attaching it to a global
251  list that is neither threadsafe, nor safe when doing nested class
252  definition.  Also added a test to validate that this works.
253- implemented singletable non-polymorphic inheritance
254- added support to pass non-keyword arguments to tables. You just pass
255  them to the using_table_options statement and they will be forwarded to the
256  table along with the keyword arguments. This can be used to set table
257  constraints.
258- added support for deferred columns (use the "deferred" keyword argument on
259  fields)
260- added a "required" keyword argument on fields and BelongsTo
261  relationships. This is the opposite of the "nullable" SA argument.
262- added a "column_kwargs" keyword argument to BelongsTo relationships
263  to forward any keyword argument directly to the SA Column.
264- added support for the use_alter and constraint_kwargs kwargs on BelongsTo
265  relationships (forwarded to SA ForeignKeyConstraint).
266    -> removed the systematic use_alter on BelongsTo relations since it
267       can now be specified only when needed.
268    -> removed it from HasAndBelongsToMany relations, since I think a
269       circular foreign key dependency can't happen with those relations.
270- fixed foreign key names on MySQL (and possibly other) databases by
271  making sure the generated name is unique for the whole database, and not
272  only for the table on which it applies.
273- corrected some docstrings
274
2750.1.0 - 2007-02-12
276initial release
Note: See TracBrowser for help on using the browser.