root / elixir / trunk / CHANGES @ 327

Revision 327, 14.8 kB (checked in by ged, 5 years ago)

- Fixed inheritance with autoloaded entities: when using autoload, we

shouldn't try to add columns to the table (closes tickets #41 and #43).

- Fixed ColumnProperty to work with latest version of SQLAlchemy (O.4.5 and

later)

- Added AUTHORS list. If you are missing from this list, don't hesitate to

contact me.

- Merged test_autoload_nopk into test_autoload

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