DataNucleus JIRA is now in read-only mode. Raise any new issues in GitHub against the plugin that it applies to. DataNucleus JIRA will remain for the foreseeable future but will eventually be discontinued
Issue Details (XML | Word | Printable)

Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Andy Jefferson
Votes: 0
Watchers: 0

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

Should allow M-N ordered lists but currently dont

Created: 20/Dec/13 12:39 PM   Updated: 21/Dec/13 11:37 AM   Resolved: 20/Dec/13 04:01 PM
Component/s: ORM
Affects Version/s: None
Fix Version/s: 3.2.10

 Description  « Hide
We currently only support M-N relations for Sets since lists were traditionally indexed only (and it makes no sense at all to have a M-N indexed list relation, since there would have to be 2 indexes in the join table, and inserting would be a nightmare to set both index positions). In principle an ordered List should be usable as an M-N relation. The problem with this currently is that JoinListStore has no logic to not persist duplicates (one from each side) whereas JoinSetStore does have some logic for this.

Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 20/Dec/13 04:01 PM
GitHub master has code to prevent dups in ordered lists by only persisting from the owner side of the M-N. Simple test added to GutHub, and outline docs added.