db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rafael Coscolla" <rcosco...@tissat.es>
Subject Dependency between Torque and Database Fields
Date Fri, 17 Oct 2003 07:10:28 GMT
    Hi everyone,

    after using torqe for a month i've found that it has a dependence between the database
field names and the code generated.

    Le t me explain you my doubt with an example:

    In the torque site documentation we can find that the way to serach for an object, with
an especific atribute value is:
Criteria crit = new Criteria();
crit.add(BookPeer.ISBN, "0-618-12902-2");
List v = BookPeer.doSelect(crit);

    Where ISBN is the field name of the Books Table, that seems to lead to a dependency between
your code and the Database.
In the case the field name has to be changed in the database, we will have to look for all
the references of this field in our code and replace them manually. ┬┐Does anyone 
know a different way for retriving the selected Books without refer the database fields in
my code?
    When a first read abount torqe, and began to use it, i expected that the reference, in
the peer objects, for the table field in the code will be through the javanName 
value expecified in the XML schema file, used to describe the database, as it is done in the
get and set methods of the atributes in the BaseObjects. ┬┐Does anyone know 
if this is reported as a Bug and if its going to be fixed?
    Thanks in advance.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message