Open jopasb opened 2 years ago
Query derivation is currently only supported for direct properties.
There should be already a ticket for this I think, but I can't find it.
Sorry for the somewhat misleading documentation. The part you are referring to is for all Spring Data modules and not everything in that section is supported by all modules.
Hi Jens, thanks for a quick response. Do you know maybe in which release should be this change?
We currently do not have a timeline for this.
@schauder Any update on whether you've gotten around to adding a timeline for this?
@ElTav I use the following hack in my case:
select direct.*,
nested.id nested_id,
nested.column1 nested_column1,
nested.column2 nested_column2
from direct join nested on direct.id = nested.id
where nested.column1 = :nestedColumn1Value
order by direct.id
It works at least in my case with 1-1 relantionship. It's a bit clunky because you have to include all nested table column names.
Hi, I'm using spring-data-jdbc 2.3.1 and by reading https://docs.spring.io/spring-data/jdbc/docs/current/reference/html/#repositories.query-methods.query-property-expressions , find by nested properties should work, but when I write method that tries to filter by nested property, I get an error:
Cannot query by nested property
Reference is 1on1. Should this be supported by spring-data-jdbc?