Different path length for same segment
- Dominant language
- C#
- Stars
- 490
- Forks
- 173
- PR merge metrics
- No merged PRs in 30d
Description
I am currently using version 1.3.3 and during the upgrade to the current version I have encountered the following problem:
I have a message that contains the following sequence
`SEQ+Z02'`
`CCI+Z17'`
`CAV+Z64'`
`CAV+Z63'`
`CCI+Z26++ZA8'`
`CAV+Z84'`
I'm using the following code for the serializer:
```c#
[EdiSegment, EdiSegmentGroup("SEQ")]
public class SEQ_Z02_SegmentGroup
{
[EdiCondition("Z17", Path = "CCI/0/0")]
public CCI_CAV_SegmentGroup Attribute1 { get; set; }
[EdiCondition("ZA8", Path = "CCI/2/0")]
public CCI_CAV_SegmentGroup Atrribute2 { get; set; }
}
[EdiSegment, EdiSegmentGroup("CCI", SequenceEnd = "CCI")]
public class CCI_CAV_SegmentGroup
{
[EdiValue("X(3)", Mandatory = false, Path = "CCI/0/0")]
public string CCIAttribute1 { get; set; }
[EdiValue("X(3)", Mandatory = false, Path = "CCI/1/0")]
public string CCIAttribute2 { get; set; }
[EdiValue("X(17)", Mandatory = false, Path = "CCI/2/0")]
public string CCIAttribute3 { get; set; }
[EdiValue("X(17)", Mandatory = false, Path = "CCI/2/1")]
public string CCIAttribute4 { get; set; }
[EdiValue("X(3)", Mandatory = false, Path = "CCI/2/2")]
public string CCIAttribute5 { get; set; }
[EdiValue("X(35)", Mandatory = false, Path = "CCI/2/3")]
public string CCIAttribute6 { get; set; }
public List CAVAttributes { get; set; }
}
```
With the old version this works fine but if I upgrade to a newer version the value "Z17" in the second line is found but not set in `CCIAttribute1`. I found two possibilities to make it work (but unfortunately they are not feasible for my use case):
1. Drop `Attribute2` from my class. As long as there are no other path length for the same segment this works with the current version
2. Add additional delimiters to the second line. If I change the second line to `CCI+Z17++'`, the value can be found with the newer version.
Is there any possbility to make different path values work for the same segment in `EdiCondition`?
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the supplied SEQ/CCI message using the shown C# segment-group and EdiCondition attributes, comparing version 1.3.3 with the current version. Trace the serializer/deserializer handling of different paths for repeated CCI segments. Done means both Z17 and ZA8 conditions locate and populate their corresponding attributes without requiring extra delimiters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100