Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature maps are not supported #84

Closed
yvrng opened this issue Aug 29, 2017 · 6 comments
Closed

Feature maps are not supported #84

yvrng opened this issue Aug 29, 2017 · 6 comments

Comments

@yvrng
Copy link
Contributor

yvrng commented Aug 29, 2017

Feature maps are not properly supported: the code supposed to detect and create them doesn't exist in DefaultPersistentEObject#dynamicGet(int)

@yvrng yvrng added this to the Release 1.1.0 milestone Aug 29, 2017
@yvrng yvrng changed the title FeatureMaps are not supported Feature maps are not supported Aug 29, 2017
@yvrng
Copy link
Contributor Author

yvrng commented Sep 7, 2017

Serialize a FeatureMap$Entry with EcoreUtil#convertToString leads to an IllegalArgumentException.
FeatureMap$Entry are not simple values, but K/V pairs of a EStructuralFeature and its associated value, that can be either a simple value or a model object. The current mapping is not sufficient to support them and requires a pre-process to store values that are not processed in a common way : there is no call to StoreAdapter for model objects, so the containers and the metaclasses are not stored.

@yvrng
Copy link
Contributor Author

yvrng commented Sep 15, 2017

d7de3e4: The simplest and most efficient method seems to be a simple transformation of the FeatureMap.Entry into its representation as a formatted string (featureName#value).
Pre/post-processing would require much more database calls because of the FeatureMap structure.

@paulreuter
Copy link

I have just tried to load a model in which the DocumentRoot content is stored in a feature map.

Unfortunately, the dynamicGet of DefaultPersistentEObject does not get called; the eGet method of BasicEObjectImpl calls the dynamicGet method of eSettingDelegate(eFeature) instead of its own.

This results in a ClassCastException: fr.inria.atlanmod.neoemf.core.DefaultPersistentEObject$EStoreEcoreEList cannot be cast to org.eclipse.emf.ecore.util.FeatureMap$Internal

Is this something that can be fixed by tweaking model generation, or is some modification to NeoEMF classes necessary?

@sunye
Copy link
Contributor

sunye commented Feb 17, 2018

Hi Paul,

Version 1.0.2 doesn't handle FeatureMaps. However, the current code on branch "master" solves this issue.

Regards,

@paulreuter
Copy link

paulreuter commented Feb 17, 2018 via email

@sunye
Copy link
Contributor

sunye commented Feb 17, 2018

Paul,

We did a big merge yesterday, the snapshot you have is 1 day too old. Please try again with the current snapshot.

@yvrng yvrng closed this as completed Mar 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants