This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | "New Entity Classes from Database" entity classified as join table but is not. | ||
---|---|---|---|
Product: | javaee | Reporter: | ggonzalo |
Component: | Persistence | Assignee: | Sergey Petrov <sj-nb> |
Status: | NEW --- | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 8.1 | ||
Hardware: | Macintosh | ||
OS: | Mac OS X | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | Scripts and screenshot |
Description
ggonzalo
2016-04-06 22:42:20 UTC
I also found that if the composed key has more columns, you need more extra columns in order to get the Entity created. In the example I posted, my two primary keys are of two columns, so I think the source code for determining if it is a join table is adding 2 + 2 and if the total columns in the table is 4, it is a join table, but it is incorrect because one column is the same for both keys. I you have a primary key of 3 columns, an other of 2 columns, the code is expecting at least 6 columns in the table in order to create the Entity but the table could have 4 columns only and not be a join table. |