Spring Data JPA 如何解析 属性 name containing single letter abbreviation for a word in query methods?
How does Spring Data JPA resolve property name containing single letter abbreviation for a word in query methods?
我有一个名为 属性 的实体 qYear
。我尝试在存储库中创建一个 findByIdAndQYear
方法,但这没有用。我运行变成了IllegalArgumentException: Unable to locate Attribute with the the given name [QYear] on this ManagedType
)。
但是 findByIdAndqYear
有效。知道这样的单字母缩写是如何展开的吗?
Spring 数据(不仅仅是 JPA 模块)基于 Java Bean 规范。
为了避免对规范的误解,这实际上是使用 [java.beans.Introspector][1]
.
实现的
我有一个名为 属性 的实体 qYear
。我尝试在存储库中创建一个 findByIdAndQYear
方法,但这没有用。我运行变成了IllegalArgumentException: Unable to locate Attribute with the the given name [QYear] on this ManagedType
)。
但是 findByIdAndqYear
有效。知道这样的单字母缩写是如何展开的吗?
Spring 数据(不仅仅是 JPA 模块)基于 Java Bean 规范。
为了避免对规范的误解,这实际上是使用 [java.beans.Introspector][1]
.