apache / apache/grails-intellij-plugin

Grails: Support finder methods provided by FindByBooleanFinder

Open
#105 0 comments 0 reactions 0 assignees View on GitHub
enhancement imported-from-youtrack
Dominant language
Java
Stars
17
Forks
4
Avg merge
5d 15h
Merged PRs (30d)
4

Description

The "find<booleanProperty>By*" static persistent method. This method allows querying for instances of grails domain classes based on a boolean property and any other arbitrary properties. This method returns the first result of the query.

Example:
```
Account.findActiveByHolder("Joe Blogs"); // Where class "Account" has a properties called "active" and "holder"
Account.findActiveByHolderAndBranch("Joe Blogs", "London"); // Where class "Account" has a properties called "active', "holder" and
```
In both of those queries, the query will only select Account objects where active=true.

See class org.grails.datastore.gorm.finders.FindByBooleanFinder

---

*Imported from [IDEA-80048](https://youtrack.jetbrains.com/issue/IDEA-80048) · Type: Feature · Votes: 0*
*Comments, attachments, dates and reporter are not part of the export — follow the link above for the full history.*

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading org.grails.datastore.gorm.finders.FindByBooleanFinder and tracing how the IntelliJ plugin currently recognizes Grails finder methods. Check existing finder-method support and its tests before implementing recognition for findBy* methods. Done means both example forms resolve correctly and restrict results to the boolean property being true.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.