Luis wasn’t commenting on the fact that the actual categoryID was showing as a question mark, but about the fact that there was no contentID at all in the where clause.
He expected this:
delete
from cb_contentCategories
where FK_categoryID=? and FK_contentID=?
Well, actually I don’t think he expected ANY delete since that was supposed to happen in the hibernate session and SQL should only be created for what has actually changed. But disregarding that, even if the changes are flushed to the DB immediately, the contentID should have minimally been there.
I think a testcase would not help much. I looked on the queries that are executed on DB. The delete statement was executed as well on ACF and Railo.
So it was not just in a session, the queries run on the DB.
I’m guessing it’s a bug or misunderstanding in how CF/Railo or Hibernate works. That’s why I suggested a test case so we could submit reports and get a response from those vendors.
I still maintain that people are seeing the M2M table being dropped in the ORM logs, this is normal behavior for any M2M table.Which always happens on the DB and is not related to CFML code.
Especially if Gunnar is seeing over 3000 being deleted from the DB in the logs.
I spent quite some time last night on this and found some really strange behavior from the ORM THAT I DID NOT expect.
Basically, when you modify any category, the ORM actually removes all the many to many for that specific category and re-adds them with the new content object in place.
I am suspecting this is an ORM configuration issue with cascades and how they are persisted. I am doing some initial tests on it, but I can replicate and yes, this is definitely bad for performance. Since I am lost today still, was a ticket made for this? Can somebody just post the link back real quick,
Well I hate to say it Luis, but I have been saying that right from the word go. I believe that in Java there is a way to over ride this and do it another way, but I haven’t really read into it much as ORM at that level is well over my head.
Andy,
Sometimes our focus on getting client work done and the OS suffers due to the nature of how OS works. I am still trying to attack it when time permits. Let me remind the group that this is professional open source and you can always sponsor a fix or feature. We do already so many things for free