db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stevan Gajic" <stevan.ga...@gogol-medien.de>
Subject handling of torque...
Date Tue, 02 Nov 2004 13:12:00 GMT
Hi folks!


I have the following problem:

My turbine-based webapplication uses torque to get some database-records

as objects. These objects are stored in a session since i need them in

forms without saving them. All objects should be saved into the database 

when i click the general save-button. Therefore i have written a

in which the main-object (picture) is stored by the torque save function.

works well, but the related database-table-objects (picture2category)
doesn´t save 

everytime its content if the db-table already contents any of these objects 

(especially if i removed some picture2category-objects in my session).

I tried deleting the old content of the related table before saving, but it

work. I also tried without success to excecute the torque-function save for

relative object (picture2category).

If i add something to the related table through the torque-function 

(picture.addPictureToCategoryAssociation(PictureToCategory pic2cat)),

it works and saves the changes. It only occurs when something should be

removed. Torque doesn´t provide an explicit function for pushing an object
out, therefore

i delete the single objects by removing an element of the java-arraylist,
which i get by

a torque-function (getPictureToCategories()) with the java-function remove.

The strange thing is, that removing these data-records worked until i had

something i don´t remember.

Although i tried not to go too deep in the details, i would like to know if
my method 

of working with torque is okay. I must admit that i am new to torque and i
don´t know if

i am following the correct ideas or if this is the cause for my





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