jackson-databind icon indicating copy to clipboard operation
jackson-databind copied to clipboard

Fix #1516: Support @JsonManagedReference/@JsonBackReference for property-based creators

Open JacksonJang opened this issue 2 weeks ago • 5 comments

Issue: #1516

I resolved the issue where @JsonManagedReference and @JsonBackReference annotations didn't work when used with property-based creators (@ConstructorProperties).

In addition, I added a test case in TestKotlinGithub129 to verify the fix. This test is based on testGithub129() in TestGithub149 class from [jackson-module-kotlin].

JacksonJang avatar Dec 09 '25 10:12 JacksonJang

@cowtowncoder I added conditional logic to ManagedReferenceProperty._setBackReference() and consolidated duplicate code into a single shared method. When you have a moment, please take a look.

if (value == null) {
  return;
}

JacksonJang avatar Dec 09 '25 11:12 JacksonJang

:test_tube: Code Coverage Report

Metric Coverage Change
Instructions coverage 78.8% 📈 +0.100%
Branches branches 72.5% 📈 +0.000%

Coverage data generated from JaCoCo test results

github-actions[bot] avatar Dec 13 '25 04:12 github-actions[bot]

Looks promising: I'll try to review soon -- next PR on my list to handle.

cowtowncoder avatar Dec 13 '25 04:12 cowtowncoder

:test_tube: Code Coverage Report

Metric Coverage Change
Instructions coverage 78.8% 📈 +0.100%
Branches branches 72.5% 📈 +0.000%

Coverage data generated from JaCoCo test results

github-actions[bot] avatar Dec 14 '25 04:12 github-actions[bot]

:test_tube: Code Coverage Report

Metric Coverage Change
Instructions coverage 78.8% 📈 +0.100%
Branches branches 72.5% 📈 +0.000%

Coverage data generated from JaCoCo test results

github-actions[bot] avatar Dec 14 '25 04:12 github-actions[bot]

:test_tube: Code Coverage Report

Metric Coverage Change
Instructions coverage 78.8% 📈 +0.100%
Branches branches 72.5% 📈 +0.000%

Coverage data generated from JaCoCo test results

github-actions[bot] avatar Dec 16 '25 02:12 github-actions[bot]

:test_tube: Code Coverage Report

Metric Coverage Change
Instructions coverage 78.8% 📈 +0.100%
Branches branches 72.5% 📈 +0.000%

Coverage data generated from JaCoCo test results

github-actions[bot] avatar Dec 17 '25 03:12 github-actions[bot]

:test_tube: Code Coverage Report

Metric Coverage Change
Instructions coverage 78.8% 📈 +0.100%
Branches branches 72.5% 📈 +0.000%

Coverage data generated from JaCoCo test results

github-actions[bot] avatar Dec 17 '25 04:12 github-actions[bot]

:test_tube: Code Coverage Report

Metric Coverage Change
Instructions coverage 78.8% 📈 +0.100%
Branches branches 72.5% 📈 +0.000%

Coverage data generated from JaCoCo test results

github-actions[bot] avatar Dec 17 '25 04:12 github-actions[bot]