root / elixir / trunk / CHANGES @ 240

Revision 240, 8.9 kB (checked in by ged, 7 years ago)

- Added the possibility to give a custom name for ManyToOne constraints

(patch from and closes ticket #16)

2New features:
3- Implemented a new syntax to declare fields and relationships, much closer to
4  what is found in other Python ORM's. The with_fields syntax is now
5  deprecated in favor of a that new syntax. The old statement based (has_field
6  et al.) syntax is still available though (and will remain so for quite some
7  time). This was done with help from a patch by Adam Gomaa.
8- Implemented polymorphic single-table inheritance as well as polymorphic and
9  non-polymorphic multi-table (aka joined table) inheritance.
10- Added a .query attribute on all entities. The old .query() syntax is still
11  available.
12- Added ext sub-package for additional Elixir statements.
13- Added ext.associable for generating polymorphic associations with Elixir
14  statements.
15- versioning, encrypt ext [TODO]
16- Added support for synonym properties.
17- Added shortcut syntax to define column_properties.
18- Added has_property statement to add properties on the entity mapper which
19  rely on columns (an thus need them to be defined before the property can be
20  declared). See tests/ for an example.
21- Added support for "manual session management" (ie you can now define an
22  entity with "using_options(session=None)" and it won't use any
23  SessionContext extension, nor receive the "query" attribute.
24- Made the statement system more powerfull.
27- Autodelay and init order changed => order_by + belongs_to, belongs_to + pk,
28  ... [TODO]
29- Made Elixir work with both SQLAlchemy 0.4 and 0.3.10 (with help from a patch
30  by Ants Aasma).
31- Moved away from assign_mapper, now all assign_mapper-provided methods are on
32  the Entity class. Now, if people don't like them, they have the option to
33  simply provide another base class.
34- Default objectstore is now a ScopedSession when working on SQLAlchemy 0.4.
35  It means that it's not wrapped in an Objectstore object at all. This means,
36  that depending on the version of SA you are using, you'll get a slightly
37  different behavior.
38- Relationships to other classes can now also be defined using the classes
39  themselves in addition to the class namees. Obviously, this doesn't work for
40  forward references.
41- Classes defined inside a function can now have relationships to each other.
42- Added default __init__ method on entities so that subclasses can override it
43  and still have the "set attribute by keyword" behavior by calling super()
44- Added "through" and "via" keyword arguments on relationships and has_field
45  statement, to proxy values through relationships (uses association_proxy)
46- Made EntityMeta public, so that people can actually define their own base
47  class.
48- Changed the order of relationship kwargs processing so that computed kwargs
49  can be overridden by kwargs manually passed to the statement. This should
50  only be used if you know what you are doing.
51- Added onupdate kwarg to BelongsTo relationships for consistency with the
52  ondelete kwarg
53- Added ondelete and onupdate kwargs for use with has_and_belongs_to_many
54  to apply on delete clauses to foreign key constraints on the m2m table.
55- Columns of the intermediary table of an has_and_belongs_to_many relationship
56  are now marked as primary keys.
57- Reworked how entities look for primary keys on related entities. This
58  enables one "normal" entity (fully defined in Elixir) to refer to an entity
59  which is autoloaded.
60- Added translation (from column name to column object) of the primary_key
61  mapper option so that it can actually be used. This allows to have entities
62  without any primary key defined at the table level.
63- Added the possibility to give a custom name for ManyToOne constraints
64  (patch from and closes ticket #16)
65- Dropped support for the old threadlocal SA extension (which doesn't even exist
66  anymore in SA 0.4)
68Bug fixes:
69- Reworked/cleaned tests so that they don't leak stuff to other tests (both at
70  the method level and module level) anymore. Uses nosetest's module level
71  fixture.
72- Fixed relationships to entities whose primary_key field has been defined
73  with a "key" argument (based on a patch by Paul Johnston).
74- Fixed some buggy tests.
75- Fixed relationships to tables using a schema (patch by Neil Blakey-Milner)
76- Made inverse relationships use backrefs. This fixes the "bidirectional
77  coherency" problem some people had before doing a flush. (based on a patch
78  from Remi Jolin).
800.3.0 - 2007-03-27
81- Made the provided metadata not threadlocal. This could break things for you
82  in some rare case. Please see the (newly created) FAQ file for details about
83  this.
84- Added support for autoloading/reflecting databases with
85  has_and_belongs_to_many relationships. The tablename argument is now
86  optional, but still recommended, otherwise you'll have to use the same exact
87  name for your intermediary table than the one generated. You also _have to_
88  specify at least one of either local_side or remote_side argument.
89- Added support for the "version_id_col" option on entities. This option adds
90  a column to the table which will be used to prevent concurrent modifications
91  on any row of the entity's table (i.e. it will raise an error if it happens).
92- Made the colname argument optional for belongs_to relationships in
93  autoloaded entities. It is only required to specify it if you have several
94  belongs_to relationships between two entities/tables.
95- Applied patch from "Wavy" so that columns of a table are in the same order
96  as they were declared (this only works for the has_field statement).
97- Applied patch from Isaac Csandl to add an "ondelete" argument to
98  belongs_to relationships. The content of that argument is forwarded to the
99  foreign key constraint.
100- Foreign key names generated by belongs_to relationships use column names
101  instead of relation names in case we have a relation with the same name
102  defined in several entities inheriting from the same entity using single-
103  table inheritance (and we set a custom column name in one of them to avoid
104  a column-name conflict).
105- Using invalid options on entities will now raise an exception
106- Added __version__
107- Use an explicit metaclass for entities, so that people can define their own
108  base class.
109- Changed the approach to reflecting/autoloading belongs_to relationships.
110  This shouldn't change anything to how it's used but allowed me to factor
111  some code with has_and_belongs_to_many relationships.
112- The tablename option can now be given a callable so that people can provide
113  their own function to get the table name for an entity. The tablename option
114  can now also be set globally (using the options_defaults dictionary). Of
115  course, this only makes sense for the callable usecase.
117- Fixed bug preventing having entities without any statement.
118- Fixed documentation for belongs_to relationships (the arguemnt is "required",
119  not "nullable").
120- Fixed typo which broke the use_alter argument on belongs_to relationships.
121- Fixed inheritance unit test to pass SQLAlchemy type check on relations
122  (introduced in SA 0.3.6)
123- Fixed wrong field length in autoload test (it was not noticeable with sqlite).
124- Actually make the code python 2.3 compatible (Robin's patch was based on
125  0.1.0 while I had introduced more decorators in the trunk in the mean time).
127- Made some PEP8 tweaks in many places. Used the pep8 script provided with
128  Cheesecake.
129- Some cleanup/useless code removal
1310.2.0 - 2007-02-28
132- Applied patch from Robin Munn to make the code python 2.3 compatible
133- Per a suggestion on the mailing list, look at the calling stack frame to
134  ensure that we apply statements to the proper class.  We now attach the
135  statement list to the class itself, rather than attaching it to a global
136  list that is neither threadsafe, nor safe when doing nested class
137  definition.  Also added a test to validate that this works.
138- implemented singletable non-polymorphic inheritance
139- added support to pass non-keyword arguments to tables. You just pass
140  them to the using_table_options statement and they will be forwarded to the
141  table along with the keyword arguments. This can be used to set table
142  constraints.
143- added support for deferred columns (use the "deferred" keyword argument on
144  fields)
145- added a "required" keyword argument on fields and BelongsTo
146  relationships. This is the opposite of the "nullable" SA argument.
147- added a "column_kwargs" keyword argument to BelongsTo relationships
148  to forward any keyword argument directly to the SA Column.
149- added support for the use_alter and constraint_kwargs kwargs on BelongsTo
150  relationships (forwarded to SA ForeignKeyConstraint).
151    -> removed the systematic use_alter on BelongsTo relations since it
152       can now be specified only when needed.
153    -> removed it from HasAndBelongsToMany relations, since I think a
154       circular foreign key dependency can't happen with those relations.
155- fixed foreign key names on MySQL (and possibly other) databases by
156  making sure the generated name is unique for the whole database, and not
157  only for the table on which it applies.
158- corrected some docstrings
1600.1.0 - 2007-02-12
161initial release
Note: See TracBrowser for help on using the browser.