db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <new...@pingsite.com>
Subject ID Broker woes...
Date Thu, 11 Aug 2005 00:53:35 GMT
And by "woe" I mean "whoa!"

The bits of Model that are important:
Events have AnnouncementTypes
When a new Event is created its AnnouncementTypes are copied from from 
DefaultAnnouncementTypes

So I iterate over the DefaultAnnouncementTypes, use 
BeanUtils.copyProperties to get everything that's the same copied from 
the defaults into the Event's AnnouncementTypes. Not exactly rocket 
science, there are only a couple common fields (a label, an integer used 
as a boolean, a sequence number): the ID fields are named differently.

Today when I was saving the AnnouncementTypes the idbroker started 
re-using IDs and overwriting existing entries in the AnnouncementType table.

Torque 3.1, MySQL 4.1.8, WinXP SP2

The only thing I know for sure that I did was change the 
"usecleverquantity" to false. I tried changing it back and it didn't 
affect the behavior. It's a webapp which has been stopped and restarted 
several times during the debugging, so I don't think it's because it's 
keeping stuff around. I tweaked the ID_TABLE manually to see if I was 
having issues with Pretty High Numbers (which seems to happen on occasion?).

Chunks of schema:

  <table name='announcement_type' idMethod='idbroker'>
    <column name='announcement_price' size='255' type='VARCHAR' 
required='false'/>
    <column name='client_announcement' type='INTEGER'  required='false'/>
    <column name='event_id' type='INTEGER' required='true'/>
    <column name='sequence' type='INTEGER' required='true'/>
    <column name='announcement_type_label' size='255' type='VARCHAR' 
required='false'/>
    <column name='announcement_type_id' type='INTEGER' primaryKey='true' 
required='true'/>
    <foreign-key foreignTable='event'>
      <reference local='event_id' foreign='event_id'/>
    </foreign-key>
  </table>

  <table name='default_announcement_type' idMethod='idbroker' >
    <column name='client_announcement' type='INTEGER'  required='false'/>
    <column name='default_announcement_type_id' type='INTEGER'  
primaryKey='true' required='true'/>
    <column name='sequence' type='INTEGER'  required='true'/>
    <column name='announcement_type_label' size='255' type='VARCHAR'  
required='true'/>
  </table>

If there's anything else that would help let me know; I've never really 
had any issues with Torque so I don't know what all to provide :) It 
seemed to happen all at once, but I'm not sure I ever fully exercised 
this portion of the app, so it could have existed all along and I 
wouldn't have known (it was done under Really Stupid Timing Constraints :/

TIA,

Dave




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