Skip to content

Bug Report: save(Parent) of @Repository interface resulted in duplicated Child rows in RDB / FISH-13432 #7947

@knaka888

Description

@knaka888

Brief Summary

For the Parent-Child Entity relationship, I tried to add 1 Child Entity to a specific Parent Entity using Jakarta Data 1.0 on Payara 7.2026.1. However, it resulted in 2 duplicated Child Entity rows in RDB which have the same values on each column except for primary key.

Expected Outcome

As a new Child Entity, only 1 row should be created in the RDB.

Current Outcome

As the new Child Entity, duplicated 2 rows are created in RDB. They have the same values on each column except for primary key. And both rows have the same foreign key pointing to the correct Parent Entity row.

Reproducer

I created a Maven project to reproduce this issue like the following.
Incidentally, I use "Order" class for Parent class above and "OrderItem" class as Child class in the project.

jakartadata_troubleshoot.zip

  1. At first, set up PostgreSQL database and create JDBC connection pool for the DB and assigned it to a JDBC Resource named "jdbc/DemoPool".
  2. Next, unzip the above zip file and build the unzipped Maven project to make a war file.
  3. Then, deploy the war file to your Payara Server.
  4. Finally, access to the URL, "http://hostname_of_Payara_Server:port/jakartadata/"
  5. Create a Order on the page by clicking "Create" button on the "Orders" pane.
  6. Order dialog menu comes up. Then enter some values in each field and click "Create".
  7. Once the Order is created, click the Order and click "Create" button on the "Order Items" pane.
  8. Item dialog menu comes up. Then enter some values in each field and click "Create".
  9. You can see the duplicated OrderItem entries.

Furthermore, I don't know how to update and remove OrderItem. If you could let me know how to create, update and delete OrderItem, I would appreciate it very much.

Operating System

Ubuntu 24.04.3 LTS

JDK Version

openjdk 21.0.10 2026-01-20

Payara Distribution

Payara Server Full Profile

Metadata

Metadata

Labels

Status: AcceptedConfirmed defect or accepted improvement to implement, issue has been escalated to Platform DevType: BugLabel issue as a bug defect

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions