|
Re: EMF/GWT: Resolving non-Containment references [message #798264 is a reply to message #798034] |
Tue, 14 February 2012 12:58 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
Pasquale,
I'm not sure I understand the workflow. When you say you modify
something with the editor, you're implying you also save this result
back to the data store? If you have existing resource sets that have
already loaded their contents, you'd need to unload those resources and
load them again. Nothing will automatically update the resources with
new contents...
On 14/02/2012 7:36 AM, Pasquale Gervasi wrote:
> Hi Everyone,
>
> I have a problem with retrieveing the latest version of a
> non-containment reference which is stored in a different resource -
> datastore:/resource1/non-containmentref.
>
> I have a frontend app, not the editor, that creates its own singleton
> ResourceSet which is used to create a resource and read in a parent
> object, using resource.getResource.
> The latest version of the non-containment reference, held by the
> parent which is stored in datastore:/resource1/parentobj is correctly
> retrieved when ResourceSet is created the first time.
>
> If I modify the non-containment ref, using the editor, and then
> execute another user session of my frontend app it always gives me the
> version read on the first pass.
> I tried Ecore.ResolveAll(resourceSet) with no success. The only thing
> that works is creating a new ResourceSet for each user session.
> Pasquale
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Re: EMF/GWT: Resolving non-Containment references [message #798862 is a reply to message #798611] |
Wed, 15 February 2012 06:47 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
Pat,
Yes, a resource's contents are loaded only once the first time and don't
change until you take action like this.
On 14/02/2012 11:33 PM, Pasquale Gervasi wrote:
> Hi Ed,
>
> Yes, with the editor I save the results in the datastore. I thought
> by using getResource I would automatically load the latest version.
> Assuming resourceSet is a singleton within a frontendcontroller, are
> you saying that:
>
> 1. rs = resourceSet.getResource(someURI,true)
> 2. rs.unload()
> 3. rs.load(null)
>
> Will load the latest content?
>
> Pat
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03170 seconds