I'm stumped by a JPA issue. I have a simple timesheet application.
I have a class Timesheet and a class TimesheetRow, which contains the detail. I've omitted some details, but here's the basic structure:
I've got MySQL tables like this:
Then I've got some JPA code like this:
I am getting entries in the timesheet table and associated entries in the timesheet_detail table, but I seem to be getting additional "dummy" entries in the timesheet table (one with the real data and an additional one with missing data for each timesheet row I have).
So after inserting a timesheet with one timesheet row, I have data like this:
What the heck am I doing wrong? I'm completely baffled.