Hi,
I'd like to add entity to collection of entities owned by other entity (multi to many relation).
DocumentEntity doc = new DocumentEntity
{
Id = 0,
};
doc.Save();
DataEntity meta = new MetadataEntity
{
Id = 0
};
doc.DataCollectionViaDataInDocument.Add(meta);
doc.DataCollectionViaDataInDocument.SaveMulti();
//doc.save(true); This dosn't work either
This code saves both Data and the Document but dosn't connect them by adding row in DataInDocument table.
What's the best approach on this? Do i have to manualy create DataInDocumentEntity?
Thanks in advance