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: | Entity from Database, duplicate field generation | ||
---|---|---|---|
Product: | javaee | Reporter: | martin_suter <martin_suter> |
Component: | Persistence | Assignee: | Andrei Badea <abadea> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | blaha |
Priority: | P2 | Keywords: | REGRESSION |
Version: | 6.x | ||
Hardware: | Other | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | SQL script for reproducing the issue |
Description
martin_suter
2007-12-02 09:31:42 UTC
Sorry, I can't reproduce this. When CAT_RELATION.ID was a primary key, this is what was generated: @OneToMany(cascade = CascadeType.ALL, mappedBy = "parentId") private Collection<CatRelation> catRelationCollection; @OneToOne(cascade = CascadeType.ALL, mappedBy = "category") private CatRelation catRelation; When it was not a primary key, the following was generated: @OneToMany(cascade = CascadeType.ALL, mappedBy = "parentId") private Collection<CatRelation> catRelationCollection; @OneToMany(cascade = CascadeType.ALL, mappedBy = "id") private Collection<CatRelation> catRelationCollection1; Please attach a simple schemas that you can reproduce the issue with in NetBeans 6.0. Thanks. Created attachment 53889 [details]
SQL script for reproducing the issue
Reproducible using the attached SQL script, and it is indeed a regression (5.5 behaves as stated by reporter in desc1). Fixed. Checking in src/org/netbeans/modules/j2ee/persistence/entitygenerator/DbSchemaEjbGenerator.java; /cvs/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/entitygenerator/DbSchemaEjbGenerator.java,v <-- DbSchemaEjbGenerator.java new revision: 1.10; previous revision: 1.9 done Reporter, can you please verify the bug in the latest daily build? Thanks verified. correct fields are generated - separated by an index NetBeans IDE Dev (Build 200801310006) The fix has been ported into the release601_fixes branch. Checking in DbSchemaEjbGenerator.java; /cvs/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/entitygenerator/Attic/DbSchemaEjbGenerator.java,v <-- DbSchemaEjbGenerator.java new revision: 1.9.10.1; previous revision: 1.9 done |