-
Notifications
You must be signed in to change notification settings - Fork 3.6k
HHH-14469 - Support schema-tooling on sub-sets of the relational mode… #3763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…l known to Hibernate - Initial commit adding support for tagging the various `Contributable` references (PersistentClass, Exportable)
This is still a draft. It is the first dev phase implementing the "tagging" of various @koentsje Wanted you to take a look at the changes to these various @Sanne You had brought up the search aspect so wanted to get your take on whether this works for the needs from the search perspective. Next steps are:
|
@Naros Hoping to get your thoughts on the envers aspects to this. They are pretty trivial, limited to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The proof will be in eating the pudding but AFAICS there is nothing insurmountable from the tools perspective
…l known to Hibernate - @BootstrapServiceRegistry - Support for filtering at schema-tooling level
After these last 2 committs. the only piece left is the ability (if we want) to "hide" entities for the purpose of querying and looking up metadata (HHH-14470) |
There is a compile error currently in case you didn't see it:
|
…l known to Hibernate - @BootstrapServiceRegistry - Support for filtering at schema-tooling level
Fixed the compile error in envers. Thanks @christianbauer Anyone think hiding entities (query/metamodel) from user is still a good idea? @Sanne you were the one who suggested this part - still have feelings about it? |
I personally think that hiding such entities is a bad idea, but since this behavior configurable, I guess it's fine. |
Not sure what you mean by configurable. There are 2 related features here:
Limited schema-tooling is configurable in the same sense that schema-tooling itself is configurable, so there is nothing to see there. Hiding of entities though would be a completely new concept. We could design to make it configurable, but at the moment nothing like this exists and so is not configurable. The use case that Sanne brought up was some hibernate-search specific entities. The idea being that at the moment any user can query those search entities and that it might be nice to hide those by default. The user would have to explicitly DoSomething to make them available (we had discussed hints on the Jira, but there are other possible ways) |
The jobs complain about checkstyle violation, but I cannot reproduce that locally 🤷 |
Well, we already have |
You can download the report and view it locally. Here is the error: /home/runner/work/hibernate-orm/hibernate-orm/hibernate-testing/src/main/java/org/hibernate/testing/orm/junit/BootstrapServiceRegistry.java
|
No. That setting simply says how to deal with the JPA "static metamodel" (aka, the Entity_ stuff) - how should we handle populating that. It has nothing to do with whether we expose that entity for queries or metadata look up.
Failures you cannot reproduce locally are not useful |
Hi, sorry I missed previous notifications. Yes I do still think that being able to "hide" technical entities from e.g. user queries would be useful. Interestingly I believe @yrodiere and @fax4ever are right now exploring that feature in Search that could benefit from this. I also wonder if it could be useful for the hypotethical new 2LC design, but TBH wasn't able to think much more about it so it's all a bit vague still. |
I believe you mean the similarly named yet different property
That's odd, the GH actions job just runs |
Nevermind. I missed that it is in hibernate-testing. I was only checking core and envers. Man I really dislike this Javadoc limitation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looks great to me 👍
I assume you mean That does not work. First it does not do even what you think it does. I can look up the dynamic entity from the JPA model no problem. I have a test that shows this And regardless, even if it did do what you say... it would still be available from the mapping model |
…l known to Hibernate - @BootstrapServiceRegistry - Support for filtering at schema-tooling level
Hmm, so |
Nope, I'm saying that it is also available from the JPA model. From the test, this line fails The subsequent assertion wrt the mapping model would fail also |
Indeed, this seems to have changed on wip/6.0. I was looking at the state on master. |
Not to mention it would still miss things like envers' |
Yes, Fabio is working on that. Basically we need to declare an entity used internally by Hibernate Search to publish and consume events. That entity is of no concern to users, so we'd rather hide it to avoid impacting other integrations that process metadata (JPAModelgen, ...). I suppose not making the entity available in the metamodel API would be nice, too. We will need queries, though, so if they are not allowed by default, we would need a way to override that in Hibernate Search |
The associated Jira discusses that part using hints |
Before we keep growing this discussion, let's start a Discussion :) |
I'm going to close this PR and integrate its changes upstream. The work here is limited to HHH-14469. The continuing discussion is specific to HHH-14470 so no need to hold this up |
Applied upstream |
HHH-14469 - Support schema-tooling on sub-sets of the relational model known to Hibernate
HHH-14470 - Support "hiding" domain references from sources other than ORM