db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomáš Procházka <t.procha...@centrum.cz>
Subject Re: AW: jdbc -> xml problem (MySQL)
Date Thu, 13 Apr 2006 11:36:54 GMT
Hi.


>> And exist any way how to make some of table read only access?
>> Generator will be not generate modify method for them.

T> Nothing I know of for single tables. Would be a feature though, so if
T> anyone cares to submit a patch, it is welcome.

 I don't know how Torgue generators work now, but my Idea is us another XML namespace in schema.xml
for per-table configuration of generator. For example:

    <table name="car_body" generator:readonly="true">
        <column name="id" primaryKey="true" required="true" type="INTEGER"/>
        <column name="value" size="20" type="VARCHAR"/>
    </table>


T> This is a problem of velocity. It is known a long time, but nobody came up
T> with a good idea how to prevent it :-(

   Interesting.


-------------------------- Original message --------------------------
       From: Thomas Fischer <fischer@seitenbau.net>
    Subject: AW: jdbc -> xml problem (MySQL)
       Date: Thursday, April 13, 2006, 1:27:19 PM
Attachments: <none>
      msgid:OF8CDB1FDD.F37BE9A0-ONC125714F.003EA3A2-C125714F.003EED35@seitenbau.net


>> And I found another small bug.
>> Generated source code is peculiarly formatted. For Example:


T>      Thomas



>>     /**
>>            * If this collection has already been initialized, returns
>>      * the collection. Otherwise returns the results of
>>      * getCarss(new Criteria(),Connection)
>>            * This method takes in the Connection also as input so that
>>      * referenced objects can also be obtained using a Connection
>>      * that is taken as input
>>      */
>>     public List<Cars> getCarss(Connection con) throws TorqueException


>> or


>>     public List<Cars> getCarss(Criteria criteria, Connection con)
>>             throws TorqueException
>>     {
>>               if (collCarss == null)
>>         {
>>             if (isNew())
>>             {
>>                collCarss = new ArrayList<Cars>();
>>             }
>>             else
>>             {
>>                          criteria.add(CarsPeer.BAZAR_ID, getId());
>>                          collCarss = CarsPeer.doSelect(criteria, con);
>>              }
>>          }
>>          else
>>          {
>>              // criteria has no effect for a new object
>>              if (!isNew())
>>              {
>>                  // the following code is to determine if a new query is
>>                  // called for.  If the criteria is the same as the last
>>                  // one, just return the collection.
>>                              criteria.add(CarsPeer.BAZAR_ID, getId());
>>                              if (!lastCarssCriteria.equals(criteria))
>>                  {
>>                      collCarss = CarsPeer.doSelect(criteria, con);
>>                  }
>>              }
>>          }
>>          lastCarssCriteria = criteria;

>>          return collCarss;
>>            }




>> -------------------------- Original message --------------------------
>>        From: Thoralf Rickert <thoralf.rickert@cadooz.de>
>>     Subject: AW: jdbc -> xml problem (MySQL)
>>        Date: Thursday, April 13, 2006, 12:51:08 PM
>> Attachments: <none>

T> msgid:F1EF69E69C1EED4FA3BB295B07664EEE523691@srv-master.cadooz-ag.intern

>> T> Hi!

>> >> I try used torque-gen-templates-3.2.1-dev.jar and
>> >> torque-gen-3.2.1-dev.jar from svn trunk and no Java 1.5
>> >> generics found in generated source code :-(


>> T> bye
>> T> Thoralf



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


>> ----------------------- End of original message ----------------------

>> --
>>  Tomas Prochazka


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



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


----------------------- End of original message ----------------------

-- 
 Tomas Prochazka


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


Mime
View raw message