db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trey Long <james_l...@provima.com>
Subject Re: IdBroker, Native and MSSQL
Date Wed, 21 Dec 2005 15:06:26 GMT
You know, I have had the user in the 'name' attributes of the database 
for so long I forgot about it. For some reason the generator puts it 
there, probably because I have a file that's mis configured somewhere. 
It seems when I change the name attribute to the correct database things 
start working a little more smoothly, go figure.

So now Torque appears to be letting MSSQL throw Id's in via the 
auto-increment or identity setting... I will experiment with this further.

On a closing note, is there any idea why this generator code
> torque.project = pcsw
> torque.database = mssql
> torque.database.type = mssql
> torque.database.adaptor = mssql
> torque.database.createUrl = 
> jdbc:microsoft:sqlserver://ip;DatabaseName=pcsw;SelectMethod=cursor
> torque.database.buildUrl = 
> jdbc:microsoft:sqlserver://ip;DatabaseName=pcsw;SelectMethod=cursor
> torque.database.url = 
> jdbc:microsoft:sqlserver://ip;DatabaseName=pcsw;SelectMethod=cursor
> torque.database.driver = com.microsoft.jdbc.sqlserver.SQLServerDriver
> torque.database.user = torque
> torque.database.password = torquepass
> torque.database.host = localhost
> #Table owners
> torque.database.schema = torque
would produce:
> <!-- Autogenerated by JDBCToXMLSchema! -->
> <database name="torque" defaultJavaNamingMethod="javaname">
-Jim

Andras Balogh wrote:
> Hello,
>
>    So you have in your schema like this:
> <database name="your_db" defaultIdMethod="native">
> ?
> Which version of Torque are You using?
> Also you have in torque.properties:
> torque.database.your_db.adapter=mssql
> ?
>
> Best regards,
> Andras.
>
> Trey Long wrote:
>
>> Yes, everything seems correct from my end. Here is a bit of my schema:
>>
>>>     <table name="underwritingApp">
>>>         <column name="underwriterId" primaryKey="true" 
>>> required="true" type="INTEGER" autoIncrement="true"/>
>>>         <column name="companyId" type="INTEGER"/>
>>>         <foreign-key foreignTable="company">
>>>             <reference foreign="companyId" local="companyId"/>
>>>         </foreign-key>
>>>     </table>
>>
>> It seems that if defaultIdMethod="native" then torque shouldn't 
>> attempt to insert fields like underwriterId. The only reason that I 
>> have not to use the id-broker is because torque may not be the only 
>> thing making inserts into the database.
>>
>> What I will probably end up doing is changing the id-broker 
>> increments to mismatch the DB's autoenerated keys, *IF* I can get 
>> torque to insert into that column, which is unlikely.
>>
>> -Jim
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>

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