Hi all,
seems as nobody cares that problem :-)
Ok, i will explain why i think that is really important:
Fact 1: object classes are generated as wanted, they use "javaName" in
getters()
and setters()
Fact 2: BasePeer classes uses real column name instead of "javaName"
Fact 3: Criterias for doSelect() in BasePeer classes uses also real column
names:
Criteria myCrit = new Criteria();
myCrit.add(XXXPeer.REAL_COLUMNNAME);
Fact 4: if a column name will change you have to change all sources wich use
doSelect() as shown in Fact 3.
Conclusion: Torque's O/R mapping through peers and the xml-schema
presupposes non-changing clolumn name in database. Torque does not provide
"loose coupling" between java objects and database.
I think this is really bad because you have to change your "persistant"
objects whenever a column name will be renamed in database.
Again: Is this a bug, exists a workaround or i'm doing something wrong with
schema or configuration?
Thanks,
Michael
> -----Urspr�ngliche Nachricht-----
> Von: Manske, Michael
> Gesendet: Mittwoch, 2. April 2003 18:17
> An: Turbine Torque Users List
> Betreff: javaName instead of column name
>
>
> I'm using torque-3.0 and found a problem with use of
> "javaName" in the base
> peer classes. The object model generation task does not
> generate "javaName"
> instead of
> real column name in the BaseXPeer classes.
>
> I'm using the following section in xml-schema:
>
> <table name="ADVERT_ADVERT">
> <column name="ADVERTID" primaryKey="true" required="true"
> size="19" type="DECIMAL"/>
> <column name="BEGINDATE" javaName="TEST"
> required="true" size="14"
> type="VARCHAR"/>
> <column name="ENDDATE" required="true" size="14"
> type="VARCHAR"/>
> </table>
>
>
> and get the following lines in the resulting base peer:
>
> ...
> /** the column name for the BEGINDATE field */
> public static final String BEGINDATE;
> ...
> BEGINDATE = "ADVERT_ADVERT.BEGINDATE";
>
>
> It should be "TEST" instead of "BEGINDATE".
> I have played around with "torque.sameJavaName" but without
> success...
> Is this a bug or do i something wrong?
>
> Thanks,
> Michael
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]