<< Back to previous view

[NUCCORE-584] Drop "attachPolicy" and fix AttachFieldManager Created: 20/Oct/10  Updated: 04/Oct/12  Resolved: 20/Oct/10

Status: Closed
Project: DataNucleus Core
Component/s: Persistence
Affects Version/s: 2.1.2, 2.2.0.m2
Fix Version/s: 2.1.3, 2.2.0.m3

Type: Bug Priority: Major
Reporter: Andy Jefferson Assignee: Andy Jefferson
Resolution: Fixed Votes: 0

Should just copy values in for fields that are loaded but not dirty

Comment by Andy Jefferson [ 20/Oct/10 03:08 PM ]
SVN trunk and branches/2.1 have this
Comment by Marco Lopes [ 07/Feb/11 07:36 AM ]
Andy, is the new implementation just a simple "attach-all" discard??

There must be some new LOGIC involved in this approach that radically changes the old "attach-dirty" behavior.

I believe this is the reason our APP does not work anymore with DN.
Comment by Andy Jefferson [ 07/Feb/11 08:28 AM ]
Anyone can easily click on "Subversion Commits" on any issue and see what was changed.
Comment by Marco Lopes [ 07/Feb/11 08:42 AM ]
I would be glad to take a look at "Subversion Commits", but i don't have a clue where to find it. Can't see any link, tab, option...
Comment by Andy Jefferson [ 07/Feb/11 09:09 AM ]
When viewing a JIRA issue (and logged in) there is clearly, in the middle of the page, a tab called "Subversion Commits" ("All", "Comments", "Change History", "Activity Stream", "Subversion Commits").
Comment by Marco Lopes [ 07/Feb/11 09:18 AM ]
Andy, there is NOW! After my comment. There was no tab. I even made a search to be sure. And yes. i was logged in! I will take a look. Thanks.
Comment by Marco Lopes [ 25/Sep/11 12:42 PM ]
Andy, i tried to rework my code to cope with this change, but i cannot.

I use some transactions the have delete / persist cycles, with related objects being updated, and with the new logic i cannot achieve the same results.

I have to break the cycle in TWO transactions, and that is a no go.

Please implement the old behavior back, it gives much more flexibility to DN.
Comment by Andy Jefferson [ 25/Sep/11 06:22 PM ]
Marco, I won't be re-implementing any old logic since not a priority for me. If you want that feature you can easily look in SVN and work it out. You still haven't defined what problem you have with current capabilities by way of a valid testcase so the problem is private to you, and consequently you are he only person who can understand it and implement what you need. That is the whole point of open source after all. Good luck
Comment by Marco Lopes [ 25/Sep/11 06:38 PM ]
Andy, why not stick with the "attach-dirty" (default) behavior? Why did you changed the logic?

I never had the "datanucleus.attachPolicy" defined, the docs say:
When attaching the default behaviour is to attach fields/properties that have been changed since being detached.
This property allows changing of this behaviour so that if using "attach-all" all fields are attached.
Range of Values attach-dirty | attach-all
Generated at Thu Dec 14 16:18:03 CET 2017 using JIRA 4.0#466.