Commit Graph

5242 Commits

Author SHA1 Message Date
Mike Bayer aff1798c36 adjusted __getstate__ on InstrumentedList to further avoid callables getting stuck in there... 2006-08-08 01:02:16 +00:00
Mike Bayer af59af2359 added start of a many-to-many test 2006-08-07 05:10:59 +00:00
Mike Bayer 63519a4f04 fixed small pickle bug with lazy loaders [ticket:265] 2006-08-06 16:48:30 +00:00
Mike Bayer 8f94457e56 adjustments to pool stemming from changes made for [ticket:224].
overflow counter should only be decremented if the connection actually
succeeded.  added a test script to attempt testing this.
2006-08-04 06:21:58 +00:00
Mike Bayer aaefbb7e04 - better check for ambiguous join conditions in sql.Join; propigates to a
better error message in PropertyLoader (i.e. relation()/backref()) for when
the join condition can't be reasonably determined.
- sqlite creates ForeignKeyConstraint objects properly upon table
reflection.
2006-08-03 00:28:57 +00:00
Mike Bayer 3c64a0cf73 [ticket:254] 2006-07-24 16:25:40 +00:00
Mike Bayer 946984d812 fixed reflection of foreign keys to autoload the referenced table
if it was not loaded already, affected postgres, mysql, oracle.
fixes the latest in [ticket:105]
2006-07-22 06:21:58 +00:00
Jonathan Ellis 6fed7d0166 fix doctest integration 2006-07-21 16:44:01 +00:00
Jonathan Ellis 8c5ed66843 add test for allow_null_pks 2006-07-21 16:43:32 +00:00
Mike Bayer 0b7557a30a fixed [ticket:245] 2006-07-20 01:00:30 +00:00
Mike Bayer 934ac330ea added table.exists() 2006-07-19 22:20:49 +00:00
Mike Bayer 8b50115acc added 'checkfirst' argument to table.create()/table.drop()
some 0.2.6 prep
2006-07-19 22:13:29 +00:00
Mike Bayer f4415c21c5 mapper compilation work ongoing, someday it'll work....moved
around the initialization of MapperProperty objects to be after
all mappers are created to better handle circular compilations.
do_init() method is called on all properties now which are more
aware of their "inherited" status if so.

eager loads explicitly disallowed on self-referential relationships, or
relationships to an inheriting mapper (which is also self-referential)
2006-07-19 20:25:09 +00:00
Mike Bayer bb188d2cce failing test case re: compilation 2006-07-19 06:04:31 +00:00
Mike Bayer d4c60a64a6 deferred column load could screw up the connection status in
a flush() under some circumstances, this was fixed
2006-07-14 21:02:35 +00:00
Mike Bayer bc6fbfa84a overhaul to schema, addition of ForeignKeyConstraint/
PrimaryKeyConstraint objects (also UniqueConstraint not
completed yet).  table creation and reflection modified
to be more oriented towards these new table-level objects.
reflection for sqlite/postgres/mysql supports composite
foreign keys; oracle/mssql/firebird not converted yet.
2006-07-14 20:06:09 +00:00
Mike Bayer 70469bf260 added count/count_by to assignmapper, plus a test in activemapper to try it out 2006-07-13 16:36:31 +00:00
Mike Bayer 2cb2b624f9 fixed up boolean datatype for sqlite, mysql, ms-sql 2006-07-13 01:12:53 +00:00
Mike Bayer 7cb8f04f48 still having mappers not getting compiled...sigh... 2006-07-12 20:19:32 +00:00
Mike Bayer 7d91bebccc sqlite detects version and disables CAST if version < 3.2.3
fixes to unittests, mapper extension to work better with setting/unsetting extensions
objectstore objects get 'session' attribute
2006-07-11 00:36:32 +00:00
Mike Bayer 55edd4ce95 adjument to regexp for parsing courtesy Barry Warsaw 2006-07-10 21:33:03 +00:00
Mike Bayer 5c7993080a some refactorings to activemapper, made relationship() class have some polymorphic behavior for initializing its real relation, added support + unittest for self-referential relationship 2006-07-09 19:48:02 +00:00
Mike Bayer 1b0ac7e43b added workaround for funny pragma behavior on windows pysqlite
singletonthreadpool has a dispose() method, used by proxy_engine test
to better clean up after itself on windows
2006-07-09 17:58:01 +00:00
Mike Bayer 61579c9302 ordering of UPDATE and DELETE statements within groups is now
in order of primary key values, for more deterministic ordering
after_insert/delete/update mapper extensions now called per object,
not per-object-per-table
fixed import in firebird.py
2006-07-03 15:55:20 +00:00
Mike Bayer cce1f073e3 got MS-SQL support largely working, including reflection, basic types, fair amount of ORM stuff, etc.
'rowcount' label is reseved in MS-SQL and had to change in sql.py count() as well as orm.query
2006-07-01 19:26:30 +00:00
Mike Bayer 6446bb1360 fixes to attributes/related so that get_history with passive=True returns no
AttributeHistory object if an untriggered callable was found (not sure how this used to work
OK....)
2006-06-30 03:56:49 +00:00
Jonathan LaCour 4e3aa8829a There were two significant changes in this commit:
* Added implicit primary keys to ActiveMapper.  Now, if you do not speicfy a
   primary key on your objects when declaring them, an Integer primary key
   called `id` will automatically be added to your objects for you.

 * Commented out a large chunk of the process_relationships function that
   should no longer be necessary thanks to some of the deferred mapper
   compilation that was added in SQLAlchemy 0.2.3.  I left it in the code, but
   commented it out just in case this change causes a problem in someone's
   else's code and I can put it back in if needed.
2006-06-29 23:29:37 +00:00
Mike Bayer b3927fbb88 inserting './lib/' into sys.path since PYTHONPATH no longer straightforward with latest setuptools 2006-06-29 00:28:55 +00:00
Mike Bayer 2fb9221b79 fixed endless loop bug in select_by(), if the traversal hit
two mappers that referenced each other
2006-06-28 23:01:04 +00:00
Jonathan LaCour 70b2dec19a Updated ActiveMapper to support order_by parameters on all relationships.
Thanks to Charles Duffy for this patch!
2006-06-28 17:26:48 +00:00
Mike Bayer 00844ac4df lazy load bind params properly propigate column type [ticket:225] 2006-06-27 21:48:53 +00:00
Mike Bayer a635e96b6c PG didnt like 'user' for a table name 2006-06-26 20:06:59 +00:00
Mike Bayer 49090a7a94 fixed attribute manager's ability to traverse the full set of managed attributes for a descendant class, + 2 unit tests 2006-06-26 19:55:48 +00:00
Mike Bayer dc1cc365c2 when QueuePool times out it raises a TimeoutError instead of
erroneously making another connection
2006-06-26 02:06:44 +00:00
Mike Bayer ad7ffd767d fixes to inheritance firing off dependency processors correctly + unittest 2006-06-22 22:23:57 +00:00
Mike Bayer 0e0cedaf9d identified another TLTransaction scenario, and adjusted TLConnection/TLSession to fix this as well (reverted previous change, and overriding in_transaction() instead) 2006-06-22 20:03:09 +00:00
Mike Bayer 5f3451fcc3 TLConnection insures that it is used to create a transaction via the session when begin() is called, so that it has proper transactional context, + unittests 2006-06-22 19:46:44 +00:00
Mike Bayer 0ab010867f more compilation fixes 2006-06-22 04:29:55 +00:00
Mike Bayer cf8baeeefa some cleanup to the new compilation changes 2006-06-20 23:22:54 +00:00
Mike Bayer 4445453a0c more development on using eager loads/limit/offset/join_via/order_by at the same time 2006-06-19 21:44:56 +00:00
Mike Bayer 40e9887b6d when Query does the "nested select" thing, it copies the ORDER BY to be placed on the "outer" select, so that eager loaders modify only the outer one and not the inner one 2006-06-19 20:41:42 +00:00
Mike Bayer e2b5b9d0e4 added check for conflicting backrefs + unit test
identified unit test where mapper properties must be set up before the surrogate mapper is created
2006-06-19 17:47:21 +00:00
Mike Bayer 1ffed8432e cast converted into its own ClauseElement so that it can have an explicit compilation
function in ANSICompiler
MySQLCompiler then skips most CAST calls since it only seems to support the standard syntax for Date
types; other types now a TODO for MySQL
then, polymorphic_union() function now CASTs null()s to the type corresponding to the columns in the UNION,
since postgres doesnt like mixing NULL with integer types
(long road for that .....)
2006-06-17 00:53:33 +00:00
Mike Bayer 3736b3ddff if an object fails construction, doesnt get added to the session 2006-06-17 00:45:45 +00:00
Mike Bayer f6718830bf unsupported unit test on mysql 2006-06-16 19:28:36 +00:00
Mike Bayer bcc4f63a07 removed historyarray test
ForeignKey is more intelligent about locating the parent table it represents, in the case that
its attached to a CompoundSelect column which has multiple "originals", some of which might not be schema.Columns
2006-06-16 19:02:10 +00:00
Mike Bayer 091d40344e fixed bug where if a many-to-many table mapped as "secondary" had other cols in it, delete operations would try to match up on those columns. also fixed bug in new attributes if you set a list based attribute to a blank list, properly fires the 'delete' event for the elements of the previous list 2006-06-16 03:19:53 +00:00
Mike Bayer b63c5cc8b1 fixed 'port' attribute of URL to be an integer if present [ticket:209] 2006-06-15 20:30:04 +00:00
Mike Bayer 84fdccc0cb merged attributes rewrite 2006-06-15 15:53:00 +00:00
Mike Bayer f9468e8759 if an item attached to a parent is found to be already in the session, then the "save-update" cascade operation doesnt take place. currently this prevents unncessessary cascading due to backref events, which was a massive speed hit. 2006-06-15 15:27:39 +00:00