Update of /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util
In directory sc8-pr-cvs1:/tmp/cvs-serv974/src/org/devaki/nextobjects/util
Modified Files:
NOTools.java
Log Message:
Fixed 'cancel button' bug (XXXEdit.java).
Fixed 'label button' behaviour.
Fixed remove field number -1 execption.
Fixed bung in intelligent FK creation.
Index: NOTools.java
===================================================================
RCS file: /cvsroot/nextobjects/nextobjects/nextobjects/src/org/devaki/nextobjects/util/NOTools.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** NOTools.java 28 May 2003 21:48:28 -0000 1.13
--- NOTools.java 5 Jul 2003 12:26:10 -0000 1.14
***************
*** 424,430 ****
*/
public static Column getNewStandardFk(Table pParentTable,Table pChildTable) {
Vector pk=pParentTable.getPrimaryKeys();
// at the moment work only with the first PK
! return new Column(((Column)pk.elementAt(0)).getCode(),
((Column)pk.elementAt(0)).getCode(),
((Column)pk.elementAt(0)).getType(),
--- 424,447 ----
*/
public static Column getNewStandardFk(Table pParentTable,Table pChildTable) {
+ Column column;
Vector pk=pParentTable.getPrimaryKeys();
// at the moment work only with the first PK
! if (pk.size()==0) {
! ((Column)pParentTable.getData().elementAt(0)).setPrimaryKey(true);
! column= new Column(((Column)pParentTable.getData().elementAt(0)).getCode(),
! ((Column)pParentTable.getData().elementAt(0)).getCode(),
! ((Column)pParentTable.getData().elementAt(0)).getType(),
! "",
! "",
! false, true, false,
! "",
! "",
! "",
! "",
! "",
! "",
! pChildTable);
! } else {
! column= new Column(((Column)pk.elementAt(0)).getCode(),
((Column)pk.elementAt(0)).getCode(),
((Column)pk.elementAt(0)).getType(),
***************
*** 439,442 ****
--- 456,461 ----
"",
pChildTable);
+ }
+ return column;
}
|