Categories disappear

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.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

then I am confused the where clause is there or are you expecting the actual value?

Hibernate:
delete
from
cb_contentCategories
where
FK_categoryID=?

scratch that I should have read what you said Brad.

The HQL dump looks exactly the same on Railo and ACF.

Can you reproduce a minimal example that demonstrates the behavior outside of ColdBox?

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Hi,

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.

Best regards
Andy

Any feedback on this???

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.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Not yet.

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,

thanks

signature0.jpg

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

https://ortussolutions.atlassian.net/browse/CONTENTBOX-534

signature0.jpg

THX for posting my ticket back. Luis it is great to hear that you can reproduce everything and got deep into it. Thanks for taking care of this issue.

Cheers
Andy

signature0.jpg

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.

signature0.jpg

Thanks Guys, will try another approach and report back.

signature0.jpg

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

signature0.jpg

Hey are there any news on this ?

Cheers,
Andy

Still working on it, busy in training :slight_smile:

Pull requests are welcomed as well

signature0.jpg

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Why don’t just add the new created category instead of detach and reattach?

Hi Luis,

did you have a chance to start with a fix?
For our productive installations, its getting worse the more content we have :slight_smile:

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

Luis

signature0.jpg

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano