annotated icon indicating copy to clipboard operation
annotated copied to clipboard

Fix for duplicating parent relation columns to child tables in JTI

Open peldax opened this issue 8 months ago • 14 comments

Partial fix of https://github.com/cycle/annotated/issues/97

🔍 What was changed

I removed initialization of relations if the declaring class differs from currently processed reflection class. This solves a case from issue above, where BelongsTo relation column were duplicated to child tables as well.

📝 Checklist

  • Partially solves #97, but only the sub-issue
  • How was this tested:
    • [x] Tested manually
    • [ ] Unit tests added

📃 Documentation

Not needed, this is expected behaviour.

NOTE

This solution is just a hotfix identifying the problem. The real solution will be more complex as it probably needs to deduce whether the declaring class is really the parent entity or some other class in the hierarchy between the parent entity and the child entity..

peldax avatar Jun 21 '24 09:06 peldax