[jira] Created: (DDLUTILS-47) An identity column should be an primary key

2005-11-14 Thread Juliano Julio (JIRA)
An identity column should be an primary key
---

 Key: DDLUTILS-47
 URL: http://issues.apache.org/jira/browse/DDLUTILS-47
 Project: DdlUtils
Type: Bug
 Environment: Tested on Hsql and Derby
Reporter: Juliano Julio
 Assigned to: Thomas Dudziak 
Priority: Blocker


An identity column should be a primary key too! The method 
shouldGeneratePrimaryKeys on SqlBuilder don't allow this.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Commented: (DDLUTILS-47) An identity column should be an primary key

2005-11-14 Thread Juliano Julio (JIRA)
[ 
http://issues.apache.org/jira/browse/DDLUTILS-47?page=comments#action_12357612 
] 

Juliano Julio commented on DDLUTILS-47:
---

Without primary keys, there is no foreign keys, so the FOREIGN KEY statment 
always return an error...

 An identity column should be an primary key
 ---

  Key: DDLUTILS-47
  URL: http://issues.apache.org/jira/browse/DDLUTILS-47
  Project: DdlUtils
 Type: Bug
  Environment: Tested on Hsql and Derby
 Reporter: Juliano Julio
 Assignee: Thomas Dudziak
 Priority: Blocker


 An identity column should be a primary key too! The method 
 shouldGeneratePrimaryKeys on SqlBuilder don't allow this.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Created: (DDLUTILS-48) Some columns may be UNIQUE

2005-11-14 Thread Juliano Julio (JIRA)
Some columns may be UNIQUE
--

 Key: DDLUTILS-48
 URL: http://issues.apache.org/jira/browse/DDLUTILS-48
 Project: DdlUtils
Type: Improvement
Reporter: Juliano Julio
 Assigned to: Thomas Dudziak 


Some columns must be assigned as unique, this statement is part of the ANSI SQL 
and a UNIQUE COLUMN MUST be NOT NULL too...

So we need a method setUnique(boolean) on Column class...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Resolved: (DDLUTILS-48) Some columns may be UNIQUE

2005-11-14 Thread Thomas Dudziak (JIRA)
 [ http://issues.apache.org/jira/browse/DDLUTILS-48?page=all ]
 
Thomas Dudziak resolved DDLUTILS-48:


Resolution: Won't Fix

In DdlUtils, the unique constraint is modelled via a special unique index:

table name=book
column name=book_id
type=INTEGER
required=true
primaryKey=true
autoIncrement=true/
column name=isbn
type=VARCHAR
size=15
required=true/
unique name=book_isbn
  unique-column name=isbn/
/index
  /table

 Some columns may be UNIQUE
 --

  Key: DDLUTILS-48
  URL: http://issues.apache.org/jira/browse/DDLUTILS-48
  Project: DdlUtils
 Type: Improvement
 Reporter: Juliano Julio
 Assignee: Thomas Dudziak


 Some columns must be assigned as unique, this statement is part of the ANSI 
 SQL and a UNIQUE COLUMN MUST be NOT NULL too...
 So we need a method setUnique(boolean) on Column class...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



[jira] Commented: (DDLUTILS-47) An identity column should be an primary key

2005-11-14 Thread Juliano Julio (JIRA)
[ 
http://issues.apache.org/jira/browse/DDLUTILS-47?page=comments#action_12357622 
] 

Juliano Julio commented on DDLUTILS-47:
---

Exactly! That is the point! If I setPrimaryKey(true) and setAutoincrement(true) 
this suppose to generate:

create table TABLE_NAME
(PK_NAME int generated always (or default) as identity 
...,
PRIMARY KEY (PK_NAME)
);

But the ddlutils isn't work like this... this is the reason:

 * Determines whether we should generate a primary key constraint for the 
given
 * primary key columns. By default if there are no primary keys or the 
column(s) are 
 * all auto increment (identity) columns then there is no need to generate 
a primary key 
 * constraint.

 An identity column should be an primary key
 ---

  Key: DDLUTILS-47
  URL: http://issues.apache.org/jira/browse/DDLUTILS-47
  Project: DdlUtils
 Type: Bug
  Environment: Tested on Hsql and Derby
 Reporter: Juliano Julio
 Assignee: Thomas Dudziak
 Priority: Blocker


 An identity column should be a primary key too! The method 
 shouldGeneratePrimaryKeys on SqlBuilder don't allow this.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira