This is a migrated thread and some comments may be shown as answers.

Mapping a collection property in the Visual Designer

1 Answer 52 Views
Getting Started
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jakkie Esschert van den
Top achievements
Rank 1
Jakkie Esschert van den asked on 11 Oct 2010, 03:05 PM

Hi,

I'm trying to create a class in the Visual Designer which contains a List of strings. I can create a property of the type IList<string>, but I can't figure out how to map that property to a separate table. I can get it to work by creating an additional class just to hold that string, but I really don't want the extra overhead. Is there a way to cleanly map this?

1 Answer, 1 is accepted

Sort by
0
IT-Als
Top achievements
Rank 1
answered on 11 Oct 2010, 04:22 PM
Hi Jakkie,

If you want to map this to a separate table I don't see any other option than to construct a persistent class with one field (the string) possibly also a field representing the inverse field of the class that "owns" the list of strings (the class there it is declared). The latter depends on how the relationship between the class and the list of strings is. Either 1:m with an inverse field (fk column in the "string" class) or 1:m with a join table (no need for the fk column in the "string" class, since it is in the join table)

Regards

Henrik
Tags
Getting Started
Asked by
Jakkie Esschert van den
Top achievements
Rank 1
Answers by
IT-Als
Top achievements
Rank 1
Share this question
or