Commit Graph

5645 Commits

Author SHA1 Message Date
Mike Bayer 30e4b186f2 doc edits 2010-09-22 23:48:17 -04:00
Mike Bayer eae4de02a9 - in depth docs about some merge() tips
- docs about backref cascade
- Another new flag on relationship(), cascade_backrefs,
disables the "save-update" cascade when the event was
initiated on the "reverse" side of a bidirectional
relationship.   This is a cleaner behavior so that
many-to-ones can be set on a transient object without
it getting sucked into the child object's session,
while still allowing the forward collection to
cascade.   We *might* default this to False in 0.7.
2010-09-22 14:22:16 -04:00
Mike Bayer 7b8b23b427 - Query.select_from() has been beefed up to help
ensure that a subsequent call to query.join()
will use the select_from() entity, assuming it's
a mapped entity and not a plain selectable,
as the default "left" side, not the first entity
in the Query object's list of entities.
2010-09-21 18:09:29 -04:00
Mike Bayer 8ec3e077e5 use default dialect for compile tests 2010-09-21 11:12:33 -04:00
Mike Bayer 0fdd6698ce - the logging message emitted by the engine when
a connection is first used is now "BEGIN (implicit)"
to emphasize that DBAPI has no explicit begin().
2010-09-21 11:10:07 -04:00
Mike Bayer c9125a9efd - Patched a case where query.join() would adapt the
right side to the right side of the left's join
inappropriately [ticket:1925]
2010-09-21 10:11:10 -04:00
Mike Bayer 634d547425 - scoped_session emits a warning when configure() is
called if a Session is already present (checks only the
current thread) [ticket:1924]
2010-09-21 09:33:30 -04:00
Mike Bayer 4fbd16e045 - @classproperty (soon/now @mapperproperty) takes effect for
__mapper_args__, __table_args__, __tablename__ on
a base class that is not a mixin, as well as mixins.
[ticket:1922]
2010-09-20 12:00:14 -04:00
Mike Bayer c5c8cdf3b4 - as_scalar(), label() can be called on a selectable
which contains a Column that is not yet named.
[ticket:1862]
2010-09-18 13:34:04 -04:00
Mike Bayer 003149c504 - An informative error message is raised if a Column
which has not yet been assigned a name, i.e. as in
declarative, is used in a context where it is
exported to the columns collection of an enclosing
select() construct, or if any construct involving
that column is compiled before its name is
assigned.  [ticket:1862]
2010-09-18 13:18:44 -04:00
Mike Bayer c9d7e38780 - add pk instructions for oracle 2010-09-18 12:38:27 -04:00
Mike Bayer f46c4028bc add oursql to has lastrowid 2010-09-18 12:35:25 -04:00
Mike Bayer 611fb77186 - use "key in dict" rather than KeyError if the usual case
is that the key is not present.
- don't need to uniquify Index schemes, just don't copy Indexes
that were known to be generated from the index=True flag
- user facing changes go in CHANGES
- Table.c allows string lookup
2010-09-18 11:40:25 -04:00
Chris Withers f08ea3c113 d.uh 2010-09-17 12:26:49 +01:00
Chris Withers 065eb91c4d merge 2010-09-16 21:11:32 +01:00
Chris Withers 4bcb4c98f9 add warning about dodgy use of tometadata 2010-09-16 21:10:17 +01:00
Chris Withers 27cf184b50 tometadata now copies indexes as well 2010-09-16 20:58:15 +01:00
Chris Withers fd6c85cf7f make sure kwargs are copied by tometadata 2010-09-16 20:03:18 +01:00
Mike Bayer 90d4cdbac8 - Fixed a regression in 0.6.4 whereby the change that
allowed cursor errors to be raised consistently broke
the result.lastrowid accessor.   Test coverage has
been added for result.lastrowid.   Note that lastrowid
is only supported by Pysqlite and some MySQL drivers,
so isn't super-useful in the general case.
2010-09-16 11:29:01 -04:00
Mike Bayer b609030130 hey lets pep-8 the setup.py file. 2010-09-15 22:30:31 -04:00
Mike Bayer 52735e75c5 - fix test_single test to use default dialect
- The exception raised by Session when it is used
subsequent to a subtransaction rollback (which is what
happens when a flush fails in autocommit=False mode) has
now been reworded (this is the "inactive due to a
rollback in a subtransaction" message). In particular,
if the rollback was due to an exception during flush(),
the message states this is the case, and reiterates the
string form of the original exception that occurred
during flush. If the session is closed due to explicit
usage of subtransactions (not very common), the message
just states this is the case.

- The exception raised by Mapper when repeated requests to
its initialization are made after initialization already
failed no longer assumes the "hasattr" case, since
there's other scenarios in which this message gets
emitted, and the message also does not compound onto
itself multiple times - you get the same message for
each attempt at usage. The misnomer "compiles" is being
traded out for "initialize".
2010-09-15 22:20:01 -04:00
Mike Bayer e79158e296 der, 0.6.4 2010-09-15 19:18:31 -04:00
Mike Bayer 6409a06df1 - Fixed a regression in 0.6.5 which occurred if you
passed an empty list to "include_properties" on
mapper() [ticket:1918]
2010-09-15 19:17:14 -04:00
Mike Bayer d36d8f5c6c merge tip 2010-09-15 17:42:38 -04:00
Mike Bayer 2ab0687ece - add message to documentation stating that collection validators cannot
load the collection being validated. [ticket:1916]
2010-09-15 17:42:16 -04:00
Mike Bayer 80ea586a55 remove the quick select from 0.6 2010-09-15 12:03:18 -04:00
Mike Bayer 46196ea723 merge tip 2010-09-13 22:56:13 -04:00
Mike Bayer 03523970d9 - Fixed bug that would prevent "subqueryload" from
working correctly with single table inheritance
    for a relationship from a subclass - the "where
    type in (x, y, z)" only gets placed on the inside,
    instead of repeatedly.

  - When using from_self() with single table inheritance,
    the "where type in (x, y, z)" is placed on the outside
    of the query only, instead of repeatedly.   May make
    some more adjustments to this.
2010-09-13 22:55:54 -04:00
Chris Withers 439d57ddaf fix typo 2010-09-13 17:11:53 +01:00
Mike Bayer 2ed6f06329 - adjustments for test success on postgresql, mysql 2010-09-13 02:39:39 -04:00
Mike Bayer f5d2bb60a8 - Fixed recursion bug which could occur when moving
an object from one reference to another, with
backrefs involved, where the initiating parent
was a subclass (with its own mapper) of the
previous parent.
2010-09-13 02:09:38 -04:00
Mike Bayer 18f6a06a51 more docs on this 2010-09-12 19:52:41 -04:00
Mike Bayer 423753efaa need this too 2010-09-12 19:25:19 -04:00
Mike Bayer 7ddd7fc20d turn this test back to what it was 2010-09-12 19:24:40 -04:00
Mike Bayer 71749b35d6 merge tip 2010-09-12 19:18:29 -04:00
Mike Bayer fe250af8eb - lazy loads for relationship attributes now use
the current state, not the "committed" state,
of foreign and primary key attributes
when issuing SQL, if a flush is not in process.
Previously, only the database-committed state would
be used.  In particular, this would cause a many-to-one
get()-on-lazyload operation to fail, as autoflush
is not triggered on these loads when the attributes are
determined and the "committed" state may not be
available.  [ticket:1910]

- A new flag on relationship(), load_on_pending, allows
the lazy loader to fire off on pending objects without a
flush taking place, as well as a transient object that's
been manually "attached" to the session. Note that this
flag blocks attribute events from taking place when an
object is loaded, so backrefs aren't available until
after a flush. The flag is only intended for very
specific use cases.
2010-09-12 19:18:08 -04:00
Mike Bayer 2fffc4072f - user-contributed .sty file now works with the latest sphinx, [ticket:1911] 2010-09-12 12:49:30 -04:00
Mike Bayer 109345550e merge tip 2010-09-12 12:38:15 -04:00
Mike Bayer bad4493842 - Slight improvement to the behavior of "passive_updates=False"
when placed only on the many-to-one side of a
    relationship; documentation has been clarified
    that passive_updates=False should really be on the
    one-to-many side.

  - Placing passive_deletes=True on a many-to-one emits
    a warning, since you probably intended to put it on
    the one-to-many side.
2010-09-12 12:37:43 -04:00
Mike Bayer d7df1334d0 typo #2 2010-09-09 20:08:47 -04:00
Mike Bayer 5e6e7546bd typo 2010-09-09 20:07:05 -04:00
Mike Bayer 9674b4bf17 - collection docs
- Added an assertion during flush which ensures
that no NULL-holding identity keys were generated
on "newly persistent" objects.
This can occur when user defined code inadvertently
triggers flushes on not-fully-loaded objects.
2010-09-09 19:21:23 -04:00
Mike Bayer a48ee1b397 - add doc pages for exceptions 2010-09-09 09:24:55 -04:00
Mike Bayer ce7768e313 doc edits 2010-09-08 23:06:40 -04:00
Mike Bayer 10fd828087 you'll all miss the last of the ASCII art 2010-09-08 22:39:11 -04:00
Mike Bayer a191ded054 edits 2010-09-08 15:43:24 -04:00
Mike Bayer 9f16ec981c arg, put the informix log in the wrong version 2010-09-07 13:31:45 -04:00
Mike Bayer 04cae08451 Added tag rel_0_6_4 for changeset 992dd2c055 2010-09-07 13:22:49 -04:00
Mike Bayer 992dd2c055 - Applied patches from [ticket:1904] to get
basic Informix functionality up again.  We
rely upon end-user testing to ensure that
Informix is working to some degree.
rel_0_6_4
2010-09-07 12:37:43 -04:00
Mike Bayer 177fdcb982 - Added a mutex to the identity map which mutexes
remove operations against iteration methods,
which now pre-buffer before returning an
iterable.   This because asyncrhonous gc
can remove items via the gc thread at any time.
[ticket:1891]
2010-09-07 12:16:29 -04:00