Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deserialize of X12 does not work on deeply nested segmentgroups #225

Open
tpod opened this issue Mar 2, 2022 · 1 comment
Open

Deserialize of X12 does not work on deeply nested segmentgroups #225

tpod opened this issue Mar 2, 2022 · 1 comment

Comments

@tpod
Copy link

tpod commented Mar 2, 2022

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!

@tcsyring
Copy link

tcsyring commented Apr 21, 2022

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; }
        ...
     }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants