H7 PredicateGenerator: drop the criterion handler registrations that the superclass lookup already covers
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 66/100
- Tipo di issue
- Refactoring
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Ambito
- backend
Direzione di ricerca
Start in grails-data-hibernate7 at PredicateGenerator.registerBuiltinHandlers() and findHandler, then locate the relevant spec and criterion classes. Add a spec comparing returned handler classes for every known criterion under current registrations and base registrations only. Remove entries that match their nearest registered ancestor, retain differing entries with an explanatory comment, and run the spec.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
PredicateGenerator in grails-data-hibernate7 finds the handler of a criterion with findHandler, which walks the superclass chain of the criterion's class and takes the nearest registered class. Registering Query.PropertyCriterion, Query.SubqueryCriterion, Query.PropertyNameCriterion, Query.PropertyComparisonCriterion and Query.Junction therefore covers their subclasses.
registerBuiltinHandlers() also registers each subclass on its own (Query.IsNull, Query.IsNotNull, Query.Conjunction, Query.Disjunction, Query.EqualsAll, Query.GreaterThanSome and so on, 42 entries). Each one creates another handler instance that is the same kind as the one its parent already provides.
The entries can be removed if every one of them maps to the same handler class as its nearest registered ancestor. That has to be checked and not assumed, because an entry that maps to a different handler would change behavior when it goes.
To do:
- Add a spec that compares, for every criterion class the generator knows, the handler class
findHandlerreturns with the current registrations and with only the base registrations. - Remove the entries that agree, and keep any that do not, with a comment that says why.
Raised by jdaugherty in the review of #16816 as optional. It changes no behavior and is left out of that PR to keep its diff reviewable.
- Lingua principale
- Groovy
- Stelle
- 2.9k
- Fork
- 980
- Merge medio
- 2g 4h
- PR unite (30g)
- 130
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/grails-core
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
apache/grails-core#16874 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
apache/grails-core#16858 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/grails-core#16289 · 5 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Update documentation for Java 25Forse già presa @ruthst00 l’ha presa 32 giorni fa. Apertarelates-to: documentation weekly-action-item
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
apache/grails-core#15725 ·
I maintainer di solito rispondono entro 1 giorno
-
Hibernate 7: do repeated blocks of one association share a join, or does each block get its own?Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
apache/grails-core#16889 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di apache/grails-core
Issue simili
-
`Time.at(t, in: nil)` returns UTC instead of the local time (or the time zone of `t`), unlike CRubyAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
PageParameters.hashCode is inconsistent with equals for named parameters in a different orderAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
bug implicit-state
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
I maintainer di solito rispondono entro 4 giorni