coldbox-modules / cborm

The ColdBox ORM enhancements for ColdFusion ORM & Hibernate. Make ORM not suck!
https://coldbox-orm.ortusbooks.com/
8 stars 17 forks source link

WIP: Add new events added in Lucee Hibernate extension v5.4 #42

Closed michaelborn closed 1 year ago

michaelborn commented 3 years ago

New events for Lucee's Hibernate extension version 5.4:

I could use help writing tests for these! :smile: I see one event test in BaseORMServiceTest.cfc. I personally think we should write tests for all these, though we'd obviously want to skip = true the specs if not running on Lucee.

lmajano commented 2 years ago

@michaelborn can we revisit this please

lmajano commented 2 years ago

@michaelborn can we revive this please?

michaelborn commented 2 years ago

Luis, I could use help on this Hibernate session error in my event handler test:

Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [User#8DFF91D7-0EB8-4530-8CF7A908C20124AD]

This appears to be some kind of concurrency issue, where an object is modified in the Hibernate session by some other transaction.

However... this doesn't make sense. I've created a totally NEW entity and there is no other code or threading which is modifying this entity.

Perhaps we can connect on this to resolve this issue. Most of the tests in the EventHandlerTest.cfc spec are failing with this error.

lmajano commented 2 years ago

Did you resolve it?

michaelborn commented 2 years ago

Did you resolve it?

Yep, Jon Clausen helped me over the blocker. I was setting the entity id in my entityNew() call. Evidently that's not a valid way to create entities!

I'm now stuck on getting the new Hibernate events to trigger. I'll push up what I have so far.

lmajano commented 2 years ago

@michaelborn are you still working on this?

michaelborn commented 2 years ago

@lmajano Funny story... the Lucee team added these events, but missed some lines / code and none of the new events actually work. Nor did they add tests for the new events.

I pushed up

I need help from Zac Spitzer to get these tests working on the main lucee/lucee repo or migrated to the Hibernate extension repo.

lmajano commented 2 years ago

@michaelborn should I close this?

lmajano commented 2 years ago

@michaelborn ?

michaelborn commented 2 years ago

@michaelborn ?

Apologies. I'll take another pass at the Lucee blockers.

lmajano commented 1 year ago

Is this ready for review again?

michaelborn commented 1 year ago

I'm going to close this PR. If the Lucee team ever decides to merge my PR which fixes these new Hibernate events, then we can take another look at this.

Sorry for the headache on this. It's just not worth the headspace.

See PR https://github.com/lucee/extension-hibernate/pull/31