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.

Bug 105084

Summary: Multi-field Primary Key tables should be handled better
Product: guibuilder Reporter: dave_curry <dave_curry>
Component: BindingAssignee: issues@guibuilder <issues>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on: 103058    
Bug Blocks:    

Description dave_curry 2007-05-30 00:06:06 UTC
Environment: Vista, NB6, MySQL

MyTable has a 2-field primary key.  The desktop/database wizard creates a class
that has, say, MyTablePK (representing the primary key) as a property, along
with all the non-PK fields.  The fields that make up the PK ARE accessible
through the created MyTablePK.java class, but they are not passed through to
MyTable.java.  So when trying to run the generated project, the 'field not
found' error pops up, of course.

Easy to fix, in MyTable.java, add getters for each of the pk fields:
public String getField1() {
   return MyTablePk.Field1;
}
Comment 1 Jan Stola 2007-05-30 13:28:39 UTC
*** Issue 104468 has been marked as a duplicate of this issue. ***
Comment 2 Jan Stola 2007-05-30 13:31:46 UTC
We should improve data binding support to handle multi-column primary keys 
better. Unfortunately, we have to wait until issue 103058 is fixed. JPA 
metamodel doesn't provide information about Embeddable objects by now.
Comment 3 Jan Stola 2007-11-09 12:58:21 UTC
*** Issue 121426 has been marked as a duplicate of this issue. ***
Comment 4 Jan Stola 2007-12-18 08:37:30 UTC
*** Issue 124133 has been marked as a duplicate of this issue. ***
Comment 5 Jan Stola 2008-09-23 14:32:40 UTC
*** Issue 148018 has been marked as a duplicate of this issue. ***