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

Location CSV Upload to update location properties fails with UniqueConstraint exception #720

Open
2 tasks
himeshr opened this issue Apr 30, 2024 · 0 comments
Open
2 tasks

Comments

@himeshr
Copy link
Contributor

himeshr commented Apr 30, 2024

Describe the bug
Bug discovered as part of this ticket.
When user attempts to perform Location CSV Upload to update location properties, in-case the update location addressLevel's parent's name is not unique for that addressLevelType in the organisation, then the upload of that entry fails with UniqueConstraint exception.

Exception message:
org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result: 2; nested exception is javax.persistence.NonUniqueResultException: query did not return a unique result: 2

To Reproduce
Steps to reproduce the behavior:

  1. Create/upload Locations such that the last but one addressLevelType from the bottom has 2 different addressLevels with same title but different lineages.
  2. Attempt to update properties for any of the children of the above parent addressLevel using "Create+edit" mode
  3. Upload fails with "NonUniqueResultException" exception

Refer this ticket for error case.

Expected behavior
Location CSV Upload to update location properties is successul even when addressLevel's parent's name is not unique for that addressLevelType in the organisation

Additional Information
ErrorStackTrace-3897.txt

Developer Checklist
Developer fixing the bug should fill this checklist.

  • Does the fix require extensive regression testing?
  • Are you mentioning the required scenarios that could be affected?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Analysis
Development

No branches or pull requests

1 participant