Thanks Daniel for the Patch.

Next time I will send the patch in the turbine user dev.

Just a question about the CVS repository, the jakarta-turbine-torque CVS
repository is it the repository for the Turbine 2.2 or for the Turbine 3.0.

Thanks,

Eric Theroude.


-----Original Message-----
From: Daniel Rall [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 28, 2001 11:13 AM
To: Turbine Users List
Cc: Eric Theroude
Subject: Re: [PATCH] Torque: Unique constraint generation


Thanks Eric!  I checked in your patches to Torque in
jakarta-turbine-2.  In the future, I encourage you to both use and
submit patches against jakarta-turbine-torque -- it's quite stable
these days, and will replace the older version of Torque currently in
the jakarta-turbine-2 repo.

- Dan

p.s. I neglected to mention you in the commit log, and apologize
profusely for this.  I'm sorry, it was an oversight on my part.  I
would correct the log, but I don't have the access needed to use `cvs
admin`.

Eric Theroude <[EMAIL PROTECTED]> writes:

> DESCRIPTION:
>       The name of the constraint is taking account except for the unique
> constraint.
>       To be able to generate a naming index in the schema generation for
> Oracle schema definition like this:
> CREATE TABLE TEST
> (
>     ID INT NOT NULL,
>     NAME VARCHAR2 (255)
>     CONSTRAINT MY_UNIQUE_1 UNIQUE (NAME)
> )
>
>    The attribute name in the XML definition file must be take into
account,
> two Java classes have to be modified Unique.java and Table.java.
>  And the Unique.vm file for Oracle.
>
> Diffs:
>
> Index:
./src/java/org/apache/turbine/torque/engine/database/model/Table.java
> ===================================================================
> RCS file:
>
/home/cvspublic/jakarta-turbine-2/src/java/org/apache/turbine/torque/engine/
> database/model/Table.java,v
> retrieving revision 1.2
> diff -u -r1.2 Table.java
> --- ./src/java/org/apache/turbine/torque/engine/database/model/Table.java
> 2001/08/20 02:49:31   1.2
> +++ ./src/java/org/apache/turbine/torque/engine/database/model/Table.java
> 2001/11/21 18:58:08
> @@ -410,6 +410,7 @@
>      public Unique addUnique(Attributes attrib)
>      {
>          Unique unique = new Unique();
> +        unique.loadFromXML(attrib);
>          addUnique (unique);
>          return unique;
>      }
>
> Index:
> ./src/java/org/apache/turbine/torque/engine/database/model/Unique.java
> ===================================================================
> RCS file:
>
/home/cvspublic/jakarta-turbine-2/src/java/org/apache/turbine/torque/engine/
> database/model/Unique.java,v
> retrieving revision 1.1.1.1
> diff -r1.1.1.1 Unique.java
> 96a97,105
> >      * Get the name of the unique index
>>      */
>>     public String getIndexName()
>>     {
>>         return indexName;
>>     }
>> 
>> 
>>     /**
> 156a166,176
> > 
>>     /**
>>      * Imports a column from an XML specification
>>      */
>>     public void loadFromXML (Attributes attrib)
>>     {
>>         //Name
>>         indexName = attrib.getValue("name");
>> 
>>     }
>> 
>
>
> Index: ./conf/torque/templates/sql/base/oracle/unique.vm
> ===================================================================
> RCS file:
>
/home/cvspublic/jakarta-turbine-2/conf/torque/templates/sql/base/oracle/uniq
> ue.vm,v
> retrieving revision 1.1.1.1
> diff -r1.1.1.1 unique.vm
> 2,3c2,4
> <     UNIQUE ($unique.ColumnList),
> < #end
> \ No newline at end of file
> ---
> >     CONSTRAINT $unique.IndexName UNIQUE ($unique.ColumnList),
>> #end
>> 
>
>  Eric Theroude
>  Project Manager, Paris - France 
>  iMediation - http://www.imediation.com 
>  Disclaimer: All the opinions expressed above are mine and not those from
my
> company. 
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to