Home » Archived » Riena » IObjectTransaction.addReference()
IObjectTransaction.addReference() [message #1589] |
Mon, 19 May 2008 16:04  |
Eclipse User |
|
|
|
Originally posted by: ekkehard.gentz-software.de
the JavaDoc says:
Adds the reference to a child object simular to setReferenceObject with
the difference that the referenceName refers to an unsorted collection of
objects.
does this really mean, that you only support unsorted collections ?
no SortedSet, no List ?
thx for info
ekke
|
|
| | | |
Re: IObjectTransaction.addReference() [message #15707 is a reply to message #15679] |
Mon, 20 October 2008 08:38   |
Eclipse User |
|
|
|
Hi Flavio,
your posting does not really state what "the issue" is. Being an EMF nerd its also not clear why your posted statment
should not work with Riena.
And other than that, ekke said he can live with the limitation. If you cant, please file a bugreport. Thats the way
things get done. A thread on the newsgroups help people to understand problems and exchange information. They usually
never get things done.
And you need to explain in the bugreport what goes wrong. You can also try to fix it yourself and attach a patch but
thats not a requirement. I am just trying to encourage you :-)
christian
Flavio Donzé schrieb:
> Hello
>
> Has there anything changed about this state?
> I'm trying to transfer EMF objects with Riena, which works great. The
> only problem is the usage of EObjectResolvingEList, which is used as
> soon as I have a multi reference field.
>
> Example: public List<RoleRef> getRoles() {
> if (roles == null) {
> roles = new EObjectResolvingEList<RoleRef>(RoleRef.class, this,
> BasicPackage.PERSON_BASIC__ROLES);
> }
> return roles;
> }
>
> Is it planned to fix this issue?
>
> Thanks
> Flavio
>
> ekke wrote:
>
>> christian,
>
>> I think, at the moment I can live with these limitations -
>> if I found a situation where its really a stopper, I'll file a request.
>
>> So for now its the best I'll change some of my code-generation to use
>> also LinkedHashSet and ArrayList
>
>> ekke
>
>
|
|
|
Re: IObjectTransaction.addReference() [message #16464 is a reply to message #15707] |
Tue, 21 October 2008 08:34  |
Eclipse User |
|
|
|
Originally posted by: fdo.scodi.ch
hey Christian
Sorry for not being so clear, I think I replied to the wrong post in the
first place.
I reported a bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=251501
Christian Campo wrote:
> Hi Flavio,
> your posting does not really state what "the issue" is. Being an EMF nerd
its also not clear why your posted statment
> should not work with Riena.
> And other than that, ekke said he can live with the limitation. If you cant,
please file a bugreport. Thats the way
> things get done. A thread on the newsgroups help people to understand
problems and exchange information. They usually
> never get things done.
> And you need to explain in the bugreport what goes wrong. You can also try
to fix it yourself and attach a patch but
> thats not a requirement. I am just trying to encourage you :-)
> christian
> Flavio Donzé schrieb:
>> Hello
>>
>> Has there anything changed about this state?
>> I'm trying to transfer EMF objects with Riena, which works great. The
>> only problem is the usage of EObjectResolvingEList, which is used as
>> soon as I have a multi reference field.
>>
>> Example: public List<RoleRef> getRoles() {
>> if (roles == null) {
>> roles = new EObjectResolvingEList<RoleRef>(RoleRef.class, this,
>> BasicPackage.PERSON_BASIC__ROLES);
>> }
>> return roles;
>> }
>>
>> Is it planned to fix this issue?
>>
>> Thanks
>> Flavio
>>
>> ekke wrote:
>>
>>> christian,
>>
>>> I think, at the moment I can live with these limitations -
>>> if I found a situation where its really a stopper, I'll file a request.
>>
>>> So for now its the best I'll change some of my code-generation to use
>>> also LinkedHashSet and ArrayList
>>
>>> ekke
>>
>>
|
|
|
Re: IObjectTransaction.addReference() [message #570932 is a reply to message #1589] |
Tue, 20 May 2008 11:19  |
Eclipse User |
|
|
|
We found that sorted collections in OTs really require a lot of thought. The tricky part is that you keep the original
committed values in your fields and OT keeps the changes. So the changes are a list of entry in the order they happen.
Sorted collection also require you the keep a track of more history than if its unsorted.
Consider you have a collection of (a)(b)(c). If you insert (d) at position 1, you get
(a)(d)(b)(c) then you insert (e) at position 3 you get
(a)(d)(b)(e)(c).
The field of the Transaction Object contains (a)(b)(c) and the OT contains the inserted (d) and (c).
Now you remove (d).
In a normal OT as we have it now, (d) gets removed from the OT because the only reference is within the still open
transaction. Now if you look at the code in list method to retrieve the collection what happens is that for each and
every call to "listXXX" to supply the field (a)(b)(c) and OT adds its twist on it. Now for sorted collections therefore
it cannot remove (d) because otherwise a insert position 3 gets interpreted incorrectly. (hope that makes sense so far)
So we decided to keep the sequence in Sets and List (there are Sets and Lists that we support and there are two methods
for getting them listReference(....Set<T>) and listReference List<T>). We use LinkedHashSet and ArrayList internally
which means that we keep the sequence that the field has but we currently found it too hard to guarantee that any type
of modification will work in OT for sorted collections.
If you think that should change, file a bugreport please...
more questions, let me know......
christian campo
ekke schrieb:
> the JavaDoc says:
>
> Adds the reference to a child object simular to setReferenceObject with
> the difference that the referenceName refers to an unsorted collection
> of objects.
>
> does this really mean, that you only support unsorted collections ?
> no SortedSet, no List ?
>
> thx for info
>
> ekke
>
|
|
|
Re: IObjectTransaction.addReference() [message #571084 is a reply to message #2754] |
Tue, 20 May 2008 12:05  |
Eclipse User |
|
|
|
Originally posted by: ekkehard.gentz-software.de
christian,
I think, at the moment I can live with these limitations -
if I found a situation where its really a stopper, I'll file a request.
So for now its the best I'll change some of my code-generation to use
also LinkedHashSet and ArrayList
ekke
|
|
|
Re: IObjectTransaction.addReference() [message #576560 is a reply to message #2806] |
Mon, 20 October 2008 06:34  |
Eclipse User |
|
|
|
Originally posted by: fdo.scodi.ch
Hello
Has there anything changed about this state?
I'm trying to transfer EMF objects with Riena, which works great. The only
problem is the usage of EObjectResolvingEList, which is used as soon as I
have a multi reference field.
Example:
public List<RoleRef> getRoles() {
if (roles == null) {
roles = new EObjectResolvingEList<RoleRef>(RoleRef.class, this,
BasicPackage.PERSON_BASIC__ROLES);
}
return roles;
}
Is it planned to fix this issue?
Thanks
Flavio
ekke wrote:
> christian,
> I think, at the moment I can live with these limitations -
> if I found a situation where its really a stopper, I'll file a request.
> So for now its the best I'll change some of my code-generation to use
> also LinkedHashSet and ArrayList
> ekke
|
|
|
Re: IObjectTransaction.addReference() [message #576569 is a reply to message #15679] |
Mon, 20 October 2008 08:38  |
Eclipse User |
|
|
|
Hi Flavio,
your posting does not really state what "the issue" is. Being an EMF nerd its also not clear why your posted statment
should not work with Riena.
And other than that, ekke said he can live with the limitation. If you cant, please file a bugreport. Thats the way
things get done. A thread on the newsgroups help people to understand problems and exchange information. They usually
never get things done.
And you need to explain in the bugreport what goes wrong. You can also try to fix it yourself and attach a patch but
thats not a requirement. I am just trying to encourage you :-)
christian
Flavio Donzé schrieb:
> Hello
>
> Has there anything changed about this state?
> I'm trying to transfer EMF objects with Riena, which works great. The
> only problem is the usage of EObjectResolvingEList, which is used as
> soon as I have a multi reference field.
>
> Example: public List<RoleRef> getRoles() {
> if (roles == null) {
> roles = new EObjectResolvingEList<RoleRef>(RoleRef.class, this,
> BasicPackage.PERSON_BASIC__ROLES);
> }
> return roles;
> }
>
> Is it planned to fix this issue?
>
> Thanks
> Flavio
>
> ekke wrote:
>
>> christian,
>
>> I think, at the moment I can live with these limitations -
>> if I found a situation where its really a stopper, I'll file a request.
>
>> So for now its the best I'll change some of my code-generation to use
>> also LinkedHashSet and ArrayList
>
>> ekke
>
>
|
|
|
Re: IObjectTransaction.addReference() [message #576666 is a reply to message #15707] |
Tue, 21 October 2008 08:34  |
Eclipse User |
|
|
|
Originally posted by: fdo.scodi.ch
hey Christian
Sorry for not being so clear, I think I replied to the wrong post in the
first place.
I reported a bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=251501
Christian Campo wrote:
> Hi Flavio,
> your posting does not really state what "the issue" is. Being an EMF nerd
its also not clear why your posted statment
> should not work with Riena.
> And other than that, ekke said he can live with the limitation. If you cant,
please file a bugreport. Thats the way
> things get done. A thread on the newsgroups help people to understand
problems and exchange information. They usually
> never get things done.
> And you need to explain in the bugreport what goes wrong. You can also try
to fix it yourself and attach a patch but
> thats not a requirement. I am just trying to encourage you :-)
> christian
> Flavio Donzé schrieb:
>> Hello
>>
>> Has there anything changed about this state?
>> I'm trying to transfer EMF objects with Riena, which works great. The
>> only problem is the usage of EObjectResolvingEList, which is used as
>> soon as I have a multi reference field.
>>
>> Example: public List<RoleRef> getRoles() {
>> if (roles == null) {
>> roles = new EObjectResolvingEList<RoleRef>(RoleRef.class, this,
>> BasicPackage.PERSON_BASIC__ROLES);
>> }
>> return roles;
>> }
>>
>> Is it planned to fix this issue?
>>
>> Thanks
>> Flavio
>>
>> ekke wrote:
>>
>>> christian,
>>
>>> I think, at the moment I can live with these limitations -
>>> if I found a situation where its really a stopper, I'll file a request.
>>
>>> So for now its the best I'll change some of my code-generation to use
>>> also LinkedHashSet and ArrayList
>>
>>> ekke
>>
>>
|
|
|
Goto Forum:
Current Time: Wed Apr 30 19:36:45 EDT 2025
Powered by FUDForum. Page generated in 0.04417 seconds
|