Hi everybody,
I need some suggestions about many-to-many collections.
I have two class A & B and I need that only B is a sorted collection (like a list).
Because there is no way to do this through Class diagram, I tried to add index column from Entity Relationship Specifications and at first seemed to work.
Now i realize that if I execute:
onea.bs.add(oneb);
and I call
onea.bs.isEmpty();
It always give me true. How can it be possible? I think that there is something that doesn’t work on the This_GetList method of B.
I hope to be clear
Any suggestion will be appreciate…
Maurizio
Hi Jick,
I’m away from office now. So, in the meanwhile, do you think it’s possible to have an ordered list in a many-to-many relation?
Anyway, I’ll send you ASAP
Thanks Maurizio
[quote=Jick]HI Maurizio,
Thank you for your post. Could you give me your project file to have a look?
Hi Jick,
here I am.
The following code give me the error which I told you.
One one = OneFactory.CreateOne();
Two two=TwoFactory.CreateTwo();
one.twos.Add(two);
if (two.ones.IsEmpty())
{
Console.WriteLine("Error two is empty!");
}
Thanks
Maurizio
P.S.: I’m using linux version untitled.vpp
Why do you need to modify the code? You are not suggested to do so. Is it due to the generated code doesn’t work? If so, please send us the files for reproducing the problem (i.e. ddl, project, generated code, test case…)