| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
allowed on declarative mixins, sorry. [ticket:1751]
|
|
|
|
|
|
| |
__tablename__, __table_args__, etc. now works if
the method references attributes on the ultimate
subclass. [ticket:1749]
|
|
|
|
|
| |
unpredictable __getattribute__(), i.e. Zope interfaces.
[ticket:1746]
|
|
|
|
|
| |
a column that is already present on the base class.
[ticket:1732]
|
|
|
|
| |
why..I'll eat my hat !
|
|
|
|
|
|
| |
relationship(), to eliminate confusion over the relational
algebra term. relation() however will remain available
in equal capacity for the foreseeable future. [ticket:1740]
|
|
|
|
| |
attributes
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- declarative now accepts mixin classes directly, as a means
to provide common functional and column-based elements on
all subclasses, as well as a means to propagate a fixed
set of __table_args__ or __mapper_args__ to subclasses.
For custom combinations of __table_args__/__mapper_args__ from
an inherited mixin to local, descriptors can now be used.
New details are all up in the Declarative documentation.
Thanks to Chris Withers for putting up with my strife
on this. [ticket:1707]
|
| |
|
|
|
|
|
|
|
|
| |
- the __mapper_args__ dict is copied when propagating to a subclass,
and is taken straight off the class __dict__ to avoid any
propagation from the parent. mapper inheritance already
propagates the things you want from the parent mapper.
[ticket:1393]
|
|
|
|
|
| |
Still need to decide how the argument propagation should
work in the bigger picture. [ticket:1393]
|
|
|
|
|
|
|
|
| |
as the source of class information; _as_declarative exclusively
uses the dict_ passed to it as the source of class information
(which when using DeclarativeMeta is cls.__dict__). This should
in theory make it easier for custom metaclasses to modify
the state passed into _as_declarative.
|
|
|
|
|
|
| |
original propcomparator to do what it wants.
reduces duplication of the "columns[0]" rule and removes potentially surprise behavior from the eval
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- deprecated PassiveDefault - use DefaultClause.
- the BINARY and MSBinary types now generate "BINARY" in all
cases. Omitting the "length" parameter will generate
"BINARY" with no length. Use BLOB to generate an unlengthed
binary column.
- the "quoting='quoted'" argument to MSEnum/ENUM is deprecated.
It's best to rely upon the automatic quoting.
- "shortname" attribute on bindparam() is removed.
- fold_equivalents flag on join is deprecated (will remain
until [ticket:1131] is implemented)
- "scalar" flag on select() is removed, use
select.as_scalar().
- 'transactional' flag on sessionmaker() and others is
removed. Use 'autocommit=True' to indicate 'transactional=False'.
- 'polymorphic_fetch' argument on mapper() is removed.
Loading can be controlled using the 'with_polymorphic'
option.
- 'select_table' argument on mapper() is removed. Use
'with_polymorphic=("*", <some selectable>)' for this
functionality.
- 'proxy' argument on synonym() is removed. This flag
did nothing throughout 0.5, as the "proxy generation"
behavior is now automatic.
- Passing a single list of elements to eagerload(),
eagerload_all(), contains_eager(), lazyload(),
defer(), and undefer() instead of multiple positional
-args is deprecated.
- Passing a single list of elements to query.order_by(),
query.group_by(), query.join(), or query.outerjoin()
instead of multiple positional *args is deprecated.
- query.iterate_instances() is removed. Use query.instances().
- Query.query_from_parent() is removed. Use the
sqlalchemy.orm.with_parent() function to produce a
"parent" clause, or alternatively query.with_parent().
- query._from_self() is removed, use query.from_self()
instead.
- the "comparator" argument to composite() is removed.
Use "comparator_factory".
- RelationProperty._get_join() is removed.
- the 'echo_uow' flag on Session is removed. Use
logging on the "sqlalchemy.orm.unitofwork" name.
- session.clear() is removed. use session.expunge_all().
- session.save(), session.update(), session.save_or_update()
are removed. Use session.add() and session.add_all().
- the "objects" flag on session.flush() remains deprecated.
- the "dont_load=True" flag on session.merge() is deprecated
in favor of "load=False".
- passing an InstanceState (internal SQLAlchemy state object) to
attributes.init_collection() or attributes.get_history() is
deprecated. These functions are public API and normally
expect a regular mapped object instance.
- the 'engine' parameter to declarative_base() is removed.
Use the 'bind' keyword argument.
|
|
|
|
|
|
|
|
|
|
| |
finer grained "back_populates" system, and take place entirely
within the _generate_backref() method of RelationProperty. This
makes the initialization procedure of RelationProperty
simpler and allows easier propagation of settings (such as from
subclasses of RelationProperty) into the reverse reference.
The internal BackRef() is gone and backref() returns a plain
tuple that is understood by RelationProperty.
|
|
|
|
|
|
| |
adds a __nonzero__ to _BinaryExpression to avoid faulty comparisons during hash
collisions (which only occur on Jython)
fixes #1547
|
|
|
|
|
|
| |
in string expressions sent to primaryjoin/secondaryjoin/
secondary - the name is pulled from the MetaData of the
declarative base. [ticket:1527]
|
| |
|
|
|
|
|
| |
__table_args__ is passed as a tuple with no dict argument.
Improved documentation. [ticket:1468]
|
| |
|
|
|
|
|
|
| |
when used in conjunction with __table__, if the column is already
present in __table__. The column will be remapped to the given
key the same way as when added to the mapper() properties dict.
|
|
|
|
|
| |
through __bases__, to skip over mixins that are local
to subclasses.
|
|
|
|
| |
on a backref() if it's a string.
|
|
|
|
|
|
| |
condition even if "inherits" mapper argument is given
explicitly. Allows mixins to be used with joined table
inheritance.
|
| |
|
|
|
|
| |
that specified an existing table using __table__.
|
|
|
|
|
| |
NoneType error when it's string output is requsted
(such as in a stack trace).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
table of their own (i.e. use single table inheritance).
The columns will be appended to the base table, but only
mapped by the subclass.
- For both joined and single inheriting subclasses, the subclass
will only map those columns which are already mapped on the
superclass and those explicit on the subclass. Other
columns that are present on the `Table` will be excluded
from the mapping by default, which can be disabled
by passing a blank `exclude_properties` collection to the
`__mapper_args__`. This is so that single-inheriting
classes which define their own columns are the only classes
to map those columns. The effect is actually a more organized
mapping than you'd normally get with explicit `mapper()`
calls unless you set up the `exclude_properties` arguments
explicitly.
- docs/tests
|
|
|
|
|
| |
- modernized mapper()/no table exception
- added __tablename__ exception to declarative since ppl keep complaining
|
|
|
|
|
| |
others not propagating correctly when used in
backref().
|
| |
|
|
|
|
| |
- cleanup of metadata/foreignkey docs
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Documentation has been converted to Sphinx.
In particular, the generated API documentation
has been constructed into a full blown
"API Reference" section which organizes
editorial documentation combined with
generated docstrings. Cross linking between
sections and API docs are vastly improved,
a javascript-powered search feature is
provided, and a full index of all
classes, functions and members is provided.
|
|
|
|
| |
__mapper_args__ when using declarative.
|
|
|
|
| |
declarative. Fixes #1144.
|
| |
|
|
|
|
| |
primaryjoin condition was used in conjunction with backref.
|
|
|
|
|
|
|
|
|
|
|
|
| |
within a mapper's deferred load of
inherited attributes.
- declarative initialization of Columns adjusted so that
non-renamed columns initialize in the same way as a non
declarative mapper. This allows an inheriting mapper
to set up its same-named "id" columns in particular
such that the parent "id" column is favored over the child
column, reducing database round trips when this value
is requested.
|
| |
|
|
|
|
| |
inadvertently mistake a PropertyLoader for a ColumnLoader property
|
|
|
|
|
|
| |
- The supplied __init__ is now optional
- The name of the generated class can be specified
- Accepts multiple bases
|
|
|
|
|
|
| |
takes a 'metaclass' arg, defaulting to DeclarativeMeta
renamed 'engine' arg to 'bind', backward compat
documented
|
| |
|
| |
|
|
|
|
|
|
|
| |
is either a dictionary, or tuple of the form
(arg1, arg2, ..., {kwarg1:value, ...}) which contains positional
+ kw arguments to be passed to the Table constructor.
[ticket:1096]
|
|
|
|
| |
- NameError doesn't have "message" in py2.4
|
|
|
|
|
|
| |
declarative for: order_by,
primaryjoin, secondaryjoin, secondary, foreign_keys, and remote_side.
|
|
|
|
|
|
| |
- pulled out DeclarativeMeta.__init__ into its own function, added instrument_declarative()
which will do the "declarative" thing to any class independent of its lineage (for ctheune)
- added "cls" kwarg to declarative_base() allowing user-defined base class for declarative base [ticket:1042]
|
| |
|