Auto Number in lists

Mar 6, 2016 at 11:34 PM
Edited Mar 6, 2016 at 11:35 PM
I am using this
[PersistOrderIn("NrOrdem"), OrderBy("NrOrdem")]
IList<INutriente> Nutrientes { get; set; }
the first time i save the entity it works fine, if i add more items latter the new records all get the order numbering to 0, is this by design or is this a bug?

Regards
Mar 6, 2016 at 11:38 PM
you have to explicitly add the item to list in parent entity before you save all
Mar 7, 2016 at 2:21 PM
It works.

There is another problem.

If i manualy alter the order, save changes, the order is preserved, but after that, if i add a new row the order is changed to the original order.

Thanks.
Mar 7, 2016 at 5:52 PM
hmmm... can you provide a short code example, I don't quite understand the case