Hi,
I think Torque is a real good tool and I think Torque is more than just a Om
Layer generator.
What I would like to see in Torque is :
1. Proxy concept : For example I have a screen that lists all the users. The
screen lists Name, first name and login. The problem, now is that I get all
the info of all user from the database but I just need 3 fields. So what I
propose is the add in the XML file to add an attribute proxy="true" for
columns that are in the proxy. If we want some more info about a user, we
just call the getxxx() method and then the object is retrieve fully.
2. doSelect creating subclass of the data object : As I ready expained in
some mails earlier ([Proposal] Change *Peer.doSelect() generation - Torque)
. This is the resolution of the problem is that the Peer object knows the
data object. An example : an Address table/object. I have the MyAddress
extends Address (with more methods). The doSelect() method create a vector
of Address. But I can't cast from Address to MyAddress. So I have to modify
the doSelect method to generate a vector of MyAddress. What I propose is to
modify the doSelect method. We transmit to this method the className to
generate. That meens :public static Vector doSelect(Criteria criteria,
String className).
3. There still is a problem with no-default databases. Torque generate the
Peers with Criteria criteria = new Criteria (); This is ok if the table is
in the default database. But if it maps another database there is a problem.
It would be great to add a new parameter in the XML file to tell what to put
in the criteria constructor. This should be a string with the quote ("),
allowing the put className.field. For example : <database
criteriaDBName="com.foo.Global.MY_DB_NAME">. This will generate Criteria
criteria = new Criteria (com.foo.Global.MY_DB_NAME);
I think these proposals would be useful for every one and therefore expose
them. I'd like to have your advise and I really would be pleased to
contribute. Anyway, I will do it for my purpose.
P.S.: It already exists a column attribute autoincrement="true" in the XML
file. It would be nice to retrieve it and generate
tMap.setPrimaryKeyMethod(TableMap.AUTOINCREMENT) if we want that the
database uses its own autoincrement method.
How is it possible to get this variable in WebMacro templates.
regards,
Herv�
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]