DomainModel-Sample - StackOverflowException [message #1472167] |
Thu, 13 November 2014 17:02 |
|
Hi,
today i did some debugging to solve my Entity-problem.
Then i got the idea to use 200 entities in the Xtext domain model sample.
I prepared 200 entities following the pattern:
import org.my.entities[x+1].Entity[x+1]
package org.my.entities[x] {
entity Entity[x]{
refx : Entity[x+1]
}
}
[x] means the current number of my entities from 1 to 200.
And i recognized, that the domain model sample throws an StackOverflowException, if the edited entity is lower than about Entity100.
The problem is, that editing and saving Entity100 will force loading and resolving (incl. derived state) for all entities up to Entity200.
Entity100 -> derived State (Entity100) -> resolve Entity101 -> derived State (Entity101) -> resolve Entity102 -> derived State (Entity102) and so on.
-----
Later i tried the same with Xtend.
Prepared 200 Xtend classes following the pattern:
class Base[x] {
private Base[x+1] refUpper;
private Base[x-1] refLower;
}
And i could see, that Xtend will not install the derived state for all 200 classes.
But it just resolves and installes derived state for [x], [x-1] and [x+1].
And no StackOverflowException is thrown.
I tried to find out the difference between the domain model sample and the Xtend implementation.
Could see, that Xtend uses different entries in index. Just the JvmGenericType is available there. But it also points to {resourceURI}#/1.
-------
My question is:
What has to be changed in the domain model sample, that the behavior in terms of resolving will be pretty much the same like in Xtend. I think the main parts involved are index, linking and scoping?
Thanks a lot for your help and input...
Best Florian
|
|
|
|
Powered by
FUDForum. Page generated in 0.03387 seconds