6.0.3 - Tue May 23 2017
- Try to make deepcopy, if possible, when setting/fetching values to _origData
(that is used to determine if a field has changed and needs to be updated on a
save). An example would be a stored json with a inside. If it was updated
externally, it would not be seen as an update. Now it will.
6.0.2 - Wed May 17 2017
- Update a bunch of docstrings
- Fix "valueType" missing on IRForeign*LinkField .copy and .getReprProperties
methods
6.0.1 - Wed May 17 2017
- Fix IRForeignLinkField not showing up in all in fields.foreign, which
caused that field to not show up in pydoc
6.0.0 - Tue May 16 2017
Foreign Link Support! (Link/Fetch/Save objects related to other objects, like
foreign keys)
Also, if upgrading from <5.0.0, see CONVERTING_TO_5.0.0
and ChangeLog for possibly backwards-incompatible changes made in 5.0.0.
This release has no backwards incompatible changes.
-
Add an IRForeignLinkField which allows linking another object by primary
key. You can assign it an instance of another model or a primary key, and upon
access if not already fetched the parent model will fetch the foreign object
and return it. -
Add IRForeignMultiLinkField which links one object to a list of other
objects.
^ Now that foreign fields are enabled, you can do a 1:1 conversion of your SQL
models into IndexedRedis and use them the same way. You CAN get better by
designing it for IR, but you WILL get about 5 to 15 times the performance at
least just by switching the engine.
-
Add "cascadeSave" option to saving functions. This flag (default True) will
cause all foreign link objects to be saved (inserted or updated), recursively. -
Add "cascadeFetch" option to fetching functions. This flag (default False)
will cause all foreign link objects to be fetched right away, recursively. By
default, they are fetched on first-access. -
Add "cascadeObjects" to comparison functions. This controls whether the
values on the foreign objects are considered, or if just the pk relationship
is considered. -
Add "cascadeObjects" to reload function. This controls whether if any
foreign objects have changed values, we reload them, or only if the pk was
changed.
^ See "Foreign Links" section in README for details now.
-
Some performance improvements
-
Add "diff" method to IndexedRedisModel, to compare the values on two
objects, and return a dict of "changedField" : ( valueOnFirstObj,
valueOnSecondObj ) -
Introduce "optional patches", as root-dir "patches" folder. These are
optional patches which may match your situation, but won't be included in
mainline for some reason.
There's a README in that dir which will list a brief explanation of
each optional patch, with a more descript in the comment field of the unified
diff in the same directory.