Many-to-many & ordering

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 Maurizio,

Thank you for your post. Could you give me your project file to have a look?

Best regards,
Jick

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?

Best regards,
Jick
[/quote]

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

HI Maurizio,

Thank you very much. We’ll investigate the problem and get back to you as soon as possible.

Best regards,
Jick

Hi Maurizio,

We have identified the problem, and planned to fix this in the coming release. We’ll notify you once the release is ready.

Best regards,
Jick

Hi Maurizio,

Both of your reported problems have been fixed. Please download the patch at:
http://files3.visual-paradigm.com/200710/Patch/sp1_20071003s/VP_Suite_Windows_3_1_sp1_20071003s.exe

Please run it and overwrite your current installation. If there are any further inquiry, please do not hesitate to contact me.

Best regards,
Jick Yeung

Hi Jick,
as I have said you before I’m using linux version :slight_smile:
Is there any problem?
thanks
Maurizio

[quote=Jick]Hi Maurizio,

Both of your reported problems have been fixed. Please download the patch at:
http://files3.visual-paradigm.com/200710/Patch/sp1_20071003s/VP_Suite_Windows_3_1_sp1_20071003s.exe

Please run it and overwrite your current installation. If there are any further inquiry, please do not hesitate to contact me.

Best regards,
Jick Yeung[/quote]

Hi Maurizio,

Sure. Please download the linux version at:
http://files3.visual-paradigm.com/200710/Patch/sp1_20071009b/VP_Suite_Linux_3_1_sp1_20071009b.sh

Best regards,
Jick

Hello Maurizio,

Have you tried the patch? Does it help?

Best regards,
Jick

Hi Jick,
yes, I have, but it still seems doesn’t work…
At the moment I add 2 line of code in This_GetList method.

 
private System.Collections.IList This_GetList(int key) {
			if (key == com.dbi.extranet.comunicazioni.ORMConstants.KEY_DOCUMENTO_MATERIE)
				return __materie;
			-->else if (key == com.dbi.extranet.comunicazioni.ORMConstants.KEY_DOCUMENTO_NOTIZIE)
                return __notizie;<-- 
            return null;
		}
		

[quote=Jick]Hello Maurizio,

Have you tried the patch? Does it help?

Best regards,
Jick
[/quote]

Hi Maurizio,

I’ll talk to our engineers first.

Best regards,
Jick

Hi Maurizio,

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…)

Best regards,
Jick