Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMFForms][CDO] ENumLiterals represented by combobox are not stored correctly
[EMFForms][CDO] ENumLiterals represented by combobox are not stored correctly [message #1696441] Tue, 26 May 2015 13:50 Go to next message
Phil Wim is currently offline Phil WimFriend
Messages: 89
Registered: October 2013
Member
Hi there,

i'm facing a problem with enumliterals, emfforms and cdo.

When i'm changing combobox to a different value, the corresponding commandStackListener is triggered with mostRecentCommand "Set". Old Value and new value are corresponding to my change.

When I'm committing related transaction all changed elements are stored except of combobox which stays in default value.

Any ideas on that?

I appreciate any help!

Thanks
Phil
Re: [EMFForms][CDO] ENumLiterals represented by combobox are not stored correctly [message #1696542 is a reply to message #1696441] Wed, 27 May 2015 07:42 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi,

Have you tested what happens, if you change the value programatically?

Best regards

Jonas


Am 26.05.2015 um 15:50 schrieb Phil Wim:
> Hi there,
>
> i'm facing a problem with enumliterals, emfforms and cdo.
> When i'm changing combobox to a different value, the corresponding
> commandStackListener is triggered with mostRecentCommand "Set". Old
> Value and new value are corresponding to my change.
> When I'm committing related transaction all changed elements are stored
> except of combobox which stays in default value.
>
> Any ideas on that?
>
> I appreciate any help!
>
> Thanks
> Phil
>


--
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [EMFForms][CDO] ENumLiterals represented by combobox are not stored correctly [message #1696584 is a reply to message #1696542] Wed, 27 May 2015 11:34 Go to previous messageGo to next message
Phil Wim is currently offline Phil WimFriend
Messages: 89
Registered: October 2013
Member
Just tested it.

when i'm setting it by hand it's not working eather. Obviously it's not emfforms.

Testing further showed that setting it by hand works until a next command execution is touching the object.

In my testcase when the objectToChange is added to a containment object via addcommand. The enums are reseted then. All other values are not. So if i set a estring by hand, it works as supposed.

Testcase:

1. Creating EObject
2. set enum by hand artikel.setArtikelArt(ArtikelArt.SONSTIGES);
3. syso shows correct value
3. add artikel to containment object via add command
4. syso shows default value.

Also the tested enum reference is unsetted when it's created. When i'm setting it by hand or via emfforms it's showing the default value.

Any ideas?




Re: [EMFForms][CDO] ENumLiterals represented by combobox are not stored correctly [message #1696714 is a reply to message #1696584] Thu, 28 May 2015 07:43 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Just to be sure, can you test it without CDO to isolate the issue?

Am 27.05.2015 um 13:34 schrieb Phil Wim:
> Just tested it.
> when i'm setting it by hand it's not working eather. Obviously it's not
> emfforms.
> Testing further showed that setting it by hand works until a next
> command execution is touching the object.
> In my testcase when the objectToChange is added to a containment object
> via addcommand. The enums are reseted then. All other values are not. So
> if i set a estring by hand, it works as supposed.
> Testcase:
>
> 1. Creating EObject
> 2. set enum by hand artikel.setArtikelArt(ArtikelArt.SONSTIGES);
> 3. syso shows correct value
> 3. add artikel to containment object via add command
> 4. syso shows default value.
>
> Also the tested enum reference is unsetted when it's created. When i'm
> setting it by hand or via emfforms it's showing the default value.
>
> Any ideas?
>
>
>
>


--
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [EMFForms][CDO] ENumLiterals represented by combobox are not stored correctly [message #1696738 is a reply to message #1696714] Thu, 28 May 2015 10:11 Go to previous messageGo to next message
Phil Wim is currently offline Phil WimFriend
Messages: 89
Registered: October 2013
Member
Hey Jonas,

i tested it with my model and i created a new model to really clarify. CDO does not store both.

Without CDO it's stored correctly within xmi.

Since this is totally out of my knowledge i added my testcase (model, UnitTests, cdo conf).

I really appreciate any help!

Phil



  • Attachment: Testcase.zip
    (Size: 44.69KB, Downloaded 123 times)
Re: [EMFForms][CDO] ENumLiterals represented by combobox are not stored correctly [message #1696897 is a reply to message #1696738] Fri, 29 May 2015 09:31 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 28.05.2015 um 12:11 schrieb Phil Wim:
> Hey Jonas,
>
> i tested it with my model and i created a new model to really clarify. CDO does not store both.
>
> Without CDO it's stored correctly within xmi.
>
> Since this is totally out of my knowledge i added my testcase (model, UnitTests, cdo conf).
>
> I really appreciate any help!
I've executed your CDO test case and it succeeds with an H2 database. I suspect that it's a problem with Mysql but I
currently don't have a Mysql installation to check this assumption. Please submit a bugzilla against CDO so we don't
forget to look at it.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [EMFForms][CDO] ENumLiterals represented by combobox are not stored correctly [message #1696916 is a reply to message #1696897] Fri, 29 May 2015 11:24 Go to previous messageGo to next message
Phil Wim is currently offline Phil WimFriend
Messages: 89
Registered: October 2013
Member
Thanks for your assistance!

Filed it at: https://bugs.eclipse.org/bugs/show_bug.cgi?id=468778
Re: [EMFForms][CDO] ENumLiterals represented by combobox are not stored correctly [message #1705472 is a reply to message #1696897] Sun, 16 August 2015 11:56 Go to previous message
Phil Wim is currently offline Phil WimFriend
Messages: 89
Registered: October 2013
Member
Hey Eike,

I'm getting back to this issue because i need to use enum literals in my cdo project. So i though CDO is open source, why not try to find the bug myself. Wink

While I was rereading the issue I figured that there might be a misunderstanding. You wrote you executed my testcase. You probably meant the junit case instead of executing the code and reading values in db what I did. I simply added the code without any assert methods in it. Obviously misleading to add the code without assert calls. Sorry for that!

To realize the misunderstanding i tried to use h2 instead of mysql (as you did). Same issue with h2. EnumLiterals are always stored as the default value after commit.

I tested with a complete new cdo server. I created the server with oomph repository (cdo model repository) and net4j sdk from mars repository.

To clarify i added the testcase with assert calls in it. Could you please be so kind to run it again?

Thanks in advance
Philippe
Previous Topic:The use of XPath
Next Topic:[Texo] Annotation to set EAttribute for no-NULL
Goto Forum:
  


Current Time: Tue Apr 23 06:15:24 GMT 2024

Powered by FUDForum. Page generated in 0.03075 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top