Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351185 - Derived containment references that uses feature maps can't be saved to store
Summary: Derived containment references that uses feature maps can't be saved to store
Status: CLOSED WONTFIX
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.core (show other bugs)
Version: 4.6   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-05 09:14 EDT by Nikolay Kasyanov CLA
Modified: 2016-09-24 01:40 EDT (History)
1 user (show)

See Also:


Attachments
eclipse project with generated test model (18.52 KB, application/zip)
2011-07-05 09:16 EDT, Nikolay Kasyanov CLA
no flags Details
used cdo server config (2.17 KB, text/xml)
2011-07-05 09:17 EDT, Nikolay Kasyanov CLA
no flags Details
stacktrace (3.34 KB, text/plain)
2011-07-05 09:23 EDT, Nikolay Kasyanov CLA
no flags Details
unit test (3.57 KB, application/octet-stream)
2011-07-13 17:41 EDT, Nikolay Kasyanov CLA
no flags Details
client patch (443 bytes, application/octet-stream)
2011-07-15 13:49 EDT, Nikolay Kasyanov CLA
no flags Details
server stacktrace (9.23 KB, text/plain)
2011-07-15 13:58 EDT, Nikolay Kasyanov CLA
no flags Details
right patch, against svn branch '4.0-maintanence' (674 bytes, patch)
2011-07-15 14:25 EDT, Nikolay Kasyanov CLA
no flags Details | Diff
patch (1.65 KB, patch)
2011-07-22 11:18 EDT, Nikolay Kasyanov CLA
no flags Details | Diff
stack trace for new issue (5.87 KB, text/plain)
2011-07-22 11:25 EDT, Nikolay Kasyanov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolay Kasyanov CLA 2011-07-05 09:14:56 EDT
Build Identifier: I20110613-1736

If model has reference that uses feature map and this reference is derived (and
transient, volatile), model instances with elements in such references can not be saved to store due to exception.

Tested with db (mysql) & db4o store backends.

Reproducible: Always

Steps to Reproduce:
1. Launch CDO server.
2. From CDO ui open session, add generated package http://agentlab.ru/cdo/tests to registry.
3. Start transaction.
4. Create new resource.
5. Add Library element to resource from package http://agentlab.ru/cdo/tests.
6. Add Writer element to previously created Library element.
7. Try to save resource.
Comment 1 Nikolay Kasyanov CLA 2011-07-05 09:16:06 EDT
Created attachment 199118 [details]
eclipse project with generated test model
Comment 2 Nikolay Kasyanov CLA 2011-07-05 09:17:28 EDT
Created attachment 199119 [details]
used cdo server config
Comment 3 Nikolay Kasyanov CLA 2011-07-05 09:23:12 EDT
Created attachment 199120 [details]
stacktrace
Comment 4 Nikolay Kasyanov CLA 2011-07-13 17:41:11 EDT
Created attachment 199621 [details]
unit test

I screwed up in "steps to reproduce", you need to commit transaction after adding Library instance and only then add child items.
Wrote unit test for generated and dynamic case. To use generated model use previously attached project.
Comment 5 Nikolay Kasyanov CLA 2011-07-13 17:42:22 EDT
I mean testcase, not unit test, of cource.
Comment 6 Nikolay Kasyanov CLA 2011-07-15 13:49:51 EDT
Created attachment 199763 [details]
client patch

Made some fix, that possibly fixes problem on client, but raises new problem on server.
I'll attach stacktrace.
Comment 7 Nikolay Kasyanov CLA 2011-07-15 13:58:42 EDT
Created attachment 199764 [details]
server stacktrace

To get this stacktrace simply apply change from patch and do "steps to reproduce".

looks like visitor's id not updated in library's delta.
Comment 8 Nikolay Kasyanov CLA 2011-07-15 14:25:13 EDT
Created attachment 199767 [details]
right patch, against svn branch '4.0-maintanence'
Comment 9 Nikolay Kasyanov CLA 2011-07-22 11:18:12 EDT
Created attachment 200208 [details]
patch

extended patch to fix server problem.
Can somebody review it?
Looks like it reveals another problem, I'll attach stack trace.
Comment 10 Nikolay Kasyanov CLA 2011-07-22 11:25:30 EDT
Created attachment 200209 [details]
stack trace for new issue

After applying provided patch one can add Writers and Visitors to already stored Library (in terms of provided score model). After saving Library with newly added Writers and Visitors try to add more. You'll get following stack trace.

Another glitch: "delete" menu item is inactive for writers and visitors and when trying to delete library with children I got "legacy mode is not enabled" exception, though I'm using native model.
Comment 11 Eike Stepper CLA 2012-08-14 22:55:50 EDT
Moving all open issues to 4.2. Open bugs can be ported to 4.1 maintenance after they've been fixed in master.
Comment 12 Eike Stepper CLA 2013-06-29 12:17:08 EDT
We'll try to address open problems in 4.3 (master) first and then port fixes back to 4.2.
Comment 13 Leonid Ripeynih CLA 2013-10-30 09:54:23 EDT
Eike, 
i've run into that problem today, with my .ecore model initially generated from XSD. 

Do you have any plans to adress it in near feature?
Comment 14 Eike Stepper CLA 2015-07-14 02:18:29 EDT
Moving all open bugzillas to 4.5.
Comment 15 Eike Stepper CLA 2016-07-31 01:01:21 EDT
Moving all unaddressed bugzillas to 4.6.
Comment 16 Eike Stepper CLA 2016-09-24 01:40:55 EDT
We have no plans to support feature maps.