Deserialize of X12 does not work on deeply nested segmentgroups
tpod opened this issue · comments
Simon Schoultz commented
After checking a lot of old issues and documentation I'm fairly sure how to structure the mapping. Although I may have a mistake.
But for some reason mapping stops working on deeply nested object (INSLoop works ok, but one deeper NM1Loop does not).
Please check the pullrequest and test for details.
@cleftheris hope you can find whats wrong.
Thanks!
Tyler Syring commented
If you referring to a 2100 loop (NM1 loop), this is how I got it to work.
[EdiSegmentGroup("INS", SequenceEnd = "SE"), EdiElement]
public class Loop2000 : INS
{
public List<REF> REFs { get; set; }
public List<DTP> DTPs { get; set; }
public List<Loop2100> Loop2100s { get; set; }
...
}
[EdiSegmentGroup("NM1", new[] { "PER", "N3", "N4", "DMG", "EC", "ICM", "AMT", "HLH", "HI", "LUI" })]
public class Loop2100 : NM1
{
public PER PER { get; set; }
public N3 N3 { get; set; }
public N4 N4 { get; set; }
...
}