You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by "Thoralf Rickert (JIRA)" <ji...@apache.org> on 2006/12/15 10:55:21 UTC

[jira] Created: (TORQUE-75) Map XML column informations to the generated Objects

Map XML column informations to the generated Objects
----------------------------------------------------

                 Key: TORQUE-75
                 URL: http://issues.apache.org/jira/browse/TORQUE-75
             Project: Torque
          Issue Type: Improvement
          Components: Generator
            Reporter: Thoralf Rickert


There is a small leakage of informations between XML definition and the generated Object. 

For example if you define a column as required="true" it would be good to get this information in the object. So there could be a method like isMandatory(COLUMNNAME). One application for this could be generic analyzing of objects before saving to avoid SQL exceptions.

Other informations would be size, scale and description for example.

Of course we could retrieve this informations from the database but this means that we have to communicate with the database and there could be database specific inconsistency.

-- 
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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Commented: (TORQUE-75) Map XML column informations to the generated Objects

Posted by "CG Monroe (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/TORQUE-75?page=comments#action_12458806 ] 
            
CG Monroe commented on TORQUE-75:
---------------------------------

This is all available from the associated ColumnMap object.  All you need to do is use:

   ColumnMap cMap = rec.getTableMap().getColumn( RecPeer.COL );

or
   ColumnMap cMap = RecPeer.getTableMap().getColumn( RecPeer.COL );

cMap has methods to get XML schema information like getDescription(), isNotNull(), getSize(), getScale().

This is all metadata that only need to be stored once and not in each generated object class.

Note:  Some of this was available in V3.2... but 3.3-RC1 has major rewrite of this.  See Torque-22

> Map XML column informations to the generated Objects
> ----------------------------------------------------
>
>                 Key: TORQUE-75
>                 URL: http://issues.apache.org/jira/browse/TORQUE-75
>             Project: Torque
>          Issue Type: Improvement
>          Components: Generator
>            Reporter: Thoralf Rickert
>
> There is a small leakage of informations between XML definition and the generated Object. 
> For example if you define a column as required="true" it would be good to get this information in the object. So there could be a method like isMandatory(COLUMNNAME). One application for this could be generic analyzing of objects before saving to avoid SQL exceptions.
> Other informations would be size, scale and description for example.
> Of course we could retrieve this informations from the database but this means that we have to communicate with the database and there could be database specific inconsistency.

-- 
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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Commented: (TORQUE-75) Map XML column informations to the generated Objects

Posted by "Thoralf Rickert (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/TORQUE-75?page=comments#action_12458959 ] 
            
Thoralf Rickert commented on TORQUE-75:
---------------------------------------

Okay, then is this improvement request obsolet. Sorry.

> Map XML column informations to the generated Objects
> ----------------------------------------------------
>
>                 Key: TORQUE-75
>                 URL: http://issues.apache.org/jira/browse/TORQUE-75
>             Project: Torque
>          Issue Type: Improvement
>          Components: Generator
>            Reporter: Thoralf Rickert
>
> There is a small leakage of informations between XML definition and the generated Object. 
> For example if you define a column as required="true" it would be good to get this information in the object. So there could be a method like isMandatory(COLUMNNAME). One application for this could be generic analyzing of objects before saving to avoid SQL exceptions.
> Other informations would be size, scale and description for example.
> Of course we could retrieve this informations from the database but this means that we have to communicate with the database and there could be database specific inconsistency.

-- 
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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Closed: (TORQUE-75) Map XML column informations to the generated Objects

Posted by "Thomas Fischer (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/TORQUE-75?page=all ]

Thomas Fischer closed TORQUE-75.
--------------------------------

    Fix Version/s: 3.3
       Resolution: Fixed

Is implemented already

> Map XML column informations to the generated Objects
> ----------------------------------------------------
>
>                 Key: TORQUE-75
>                 URL: http://issues.apache.org/jira/browse/TORQUE-75
>             Project: Torque
>          Issue Type: Improvement
>          Components: Generator
>            Reporter: Thoralf Rickert
>             Fix For: 3.3
>
>
> There is a small leakage of informations between XML definition and the generated Object. 
> For example if you define a column as required="true" it would be good to get this information in the object. So there could be a method like isMandatory(COLUMNNAME). One application for this could be generic analyzing of objects before saving to avoid SQL exceptions.
> Other informations would be size, scale and description for example.
> Of course we could retrieve this informations from the database but this means that we have to communicate with the database and there could be database specific inconsistency.

-- 
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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org