Improve ActionQueue to insert the parent first and the child afterward

Description

As discussed in https://github.com/hibernate/hibernate-orm/pull/3568#issuecomment-706919117

OneToOneUnidirectionalTest will fail if nullable is false

Environment

None

Activity

Show:
Nathan Xu
October 12, 2020, 12:06 PM

Interesting. I’ve thought ActionQueue has guaranteed that already. Maybe it only happens for one-to-one unidirection case?

周雁鸣
October 13, 2020, 1:07 AM

same result if I change @OneToOne to @ManyToOne.

Nathan Xu
October 13, 2020, 11:46 AM

I think Hibernate won’t sort actions unless explicitly requested for performance hit. But I still think enforcing action sorting universally is reasonable, provided we can improve ActionQueue’s sorting performance. Not sure this ticket exposes a bug. Seems a good feature request, though.

Nathan Xu
October 14, 2020, 2:49 AM

Thanks for assigning the ticket to me. Yeah, improving ActionQueue has always been in my wish list (I’ve some good ideas on that as well). I don’t think it is possible to do that in v5 and I think it would be great contribution to v6 though.

Assignee

Nathan Xu

Reporter

周雁鸣

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure