As i'm trying to experiment with it, i found out something else.
In my persist code somewhere i use:
ArticleRelationCollection arcoll = new ArticleRelationCollection();
foreach (ArticleRelationEntity ar in listContractArtikels_nt.Items)
{
ArticleRelationEntity new_ar = new ArticleRelationEntity(ar.ArrelAr1,ar.ArrelAr2);
arcoll.Add(new_ar);
}
int i = arcoll.SaveMulti();
I have an emptyARTICLE_RELATION table, and in my GUI i added a new related article to the listbox, and then try to persist. It goes nicely into the foreach, adds a new ArticleRelationEntity to the ArticleRelationCollection, and the arcoll.SaveMulti() returns 1. But when i refresh my database table ARTICLE_RELATION, there is nothing in it
EDIT:
i replaced the code in the foreach with
ArticleRelationEntity new_ar = new ArticleRelationEntity();
new_ar.ArrelAr1 = ar.ArrelAr1;
new_ar.ArrelAr2 = ar.ArrelAr2;
arcoll.Add(new_ar);
and now it works. Is this normal ? Why did the collection.SaveMulti reported 1 save with the other code but didn't save anything ?