Bug 105084 - Multi-field Primary Key tables should be handled better
Multi-field Primary Key tables should be handled better
Status: NEW
Product: guibuilder
Classification: Unclassified
Component: Binding
6.x
PC Windows XP
: P3 with 2 votes (vote)
: 7.4
Assigned To: issues@guibuilder
issues@guibuilder
sp_review_61
:
: 104468 121426 124133 148018 (view as bug list)
Depends on: 103058
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-30 00:06 UTC by dave_curry
Modified: 2013-01-08 14:37 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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. ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo