Issue Details (XML | Word | Printable)

Key: NUCCORE-584
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Andy Jefferson
Reporter: Andy Jefferson
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
DataNucleus Core

Drop "attachPolicy" and fix AttachFieldManager

Created: 20/Oct/10 01:27 PM   Updated: 04/Oct/12 05:02 PM   Resolved: 20/Oct/10 03:08 PM
Component/s: Persistence
Affects Version/s: 2.1.2, 2.2.0.m2
Fix Version/s: 2.1.3, 2.2.0.m3


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

Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 20/Oct/10 03:08 PM
SVN trunk and branches/2.1 have this

Marco Lopes added a comment - 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.

Andy Jefferson added a comment - 07/Feb/11 08:28 AM
Anyone can easily click on "Subversion Commits" on any issue and see what was changed.

Marco Lopes added a comment - 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...

Andy Jefferson added a comment - 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").

Marco Lopes added a comment - 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.

Marco Lopes added a comment - 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.

Andy Jefferson added a comment - 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

Marco Lopes added a comment - 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:
datanucleus.attachPolicy
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