summaryrefslogtreecommitdiff
path: root/test/base/attributes.py
Commit message (Collapse)AuthorAgeFilesLines
* - attributes module and test suite moves underneath 'orm' packageMike Bayer2006-10-221-333/+0
| | | | | | | | | | | | | - fixed table comparison example in metadata.txt - docstrings all over the place - renamed mapper _getattrbycolumn/_setattrbycolumn to get_attr_by_column,set_attr_by_column - removed frommapper parameter from populate_instance(). the two operations can be performed separately - fix to examples/adjacencytree/byroot_tree.py to fire off lazy loaders upon load, to reduce query calling - added get(), get_by(), load() to MapperExtension - re-implemented ExtensionOption (called by extension() function) - redid _ExtensionCarrier to function dynamically based on __getattribute__ - added logging to attributes package, indicating the execution of a lazy callable - going to close [ticket:329]
* - added "mutable" flag to PickleType, set to False to allow old (faster) ↵Mike Bayer2006-09-231-3/+3
| | | | | | | behavior - fix attribute unit test - attributes have explicit flag for "mutable_scalars", propigated by ColumnProperty
* - added "pickleable" module to test suite to have cPickle-compatibleMike Bayer2006-09-231-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | test objects - added copy_function, compare_function arguments to InstrumentedAttribute - added MutableType mixin, copy_value/compare_values methods to TypeEngine, PickleType - ColumnProperty and DeferredProperty propigate the TypeEngine copy/compare methods to the attribute instrumentation - cleanup of UnitOfWork, removed unused methods - UnitOfWork "dirty" list is calculated across the total collection of persistent objects when called, no longer has register_dirty. - attribute system can still report "modified" status fairly quickly, but does extra work for InstrumentedAttributes that have detected a "mutable" type where catching the __set__() event is not enough (i.e. PickleTypes) - attribute tracking modified to be more intelligent about detecting changes, particularly with mutable types. TypeEngine objects now take a greater role in defining how to compare two scalar instances, including the addition of a MutableType mixin which is implemented by PickleType. unit-of-work now tracks the "dirty" list as an expression of all persistent objects where the attribute manager detects changes. The basic issue thats fixed is detecting changes on PickleType objects, but also generalizes type handling and "modified" object checking to be more complete and extensible.
* restored "optimistic" behavior of hasparent. its generally disastrous ↵Mike Bayer2006-09-051-4/+5
| | | | without that flag as its impossible to load all lazy loaders, deal with attributes that "noload", etc. just to check for orphan status.
* - further changes to attributes with regards to "trackparent". the "commit" ↵Mike Bayer2006-09-021-13/+7
| | | | | | | | | | operation now sets a "hasparent" flag for all attributes to all objects. that way lazy loads via callables get included in trackparent, and eager loads do as well because the mapper calls commit() on all objects at load time. this is a less shaky method than the "optimistic" thing in the previous commit, but uses more memory and involves more overhead. - some tweaks/cleanup to unit tests
* futher fix to the "orphan state" idea. to avoid setting tons ofMike Bayer2006-09-011-3/+15
| | | | | | | | | | "hasparent" flags on objects as they are loaded, both from lazy and eager loads, the "orphan" check now uses an "optimistic" flag to determine the result if no "hasparent" flag is found for a particular relationship on an instance. if the instance has an _instance_key and therefore was loaded from the database, it is assumed to not be an orphan unless a "False" hasparent flag has been set. if the instance does not have an _instance_key and is therefore transient/pending, it is assumed to be an orphan unless a "True" hasparent flag has been set.
* insure that "parent" pointers are set up on objects that were lazily loadedMike Bayer2006-09-011-2/+28
|
* adjusted __getstate__ on InstrumentedList to further avoid callables getting ↵Mike Bayer2006-08-081-2/+2
| | | | stuck in there...
* fixed small pickle bug with lazy loaders [ticket:265]Mike Bayer2006-08-061-0/+9
|
* [ticket:254]Mike Bayer2006-07-241-0/+15
|
* fixed attribute manager's ability to traverse the full set of managed ↵Mike Bayer2006-06-261-0/+16
| | | | attributes for a descendant class, + 2 unit tests
* merged attributes rewriteMike Bayer2006-06-151-8/+52
|
* "parent track" function needed to be more specific to the parent classMike Bayer2006-06-101-0/+25
|
* reorganized unit tests into subdirectoriesMike Bayer2006-06-051-0/+171