Hibernate 来自方法的Spring数据查询不';不认识列

Hibernate 来自方法的Spring数据查询不';不认识列,hibernate,spring-data,Hibernate,Spring Data,我使用的是Spring数据,我已经创建了封装在“AbstractEntity”中的实体,所有对象都扩展该实体以获得基本列 抽象实体: @MappedSuperclass public abstract class AbstractEntity implements Serializable{ @Temporal(TemporalType.TIMESTAMP) @Column(nullable = false) private Date CreatedDate;

我使用的是Spring数据,我已经创建了封装在“AbstractEntity”中的实体,所有对象都扩展该实体以获得基本列

抽象实体:

@MappedSuperclass
public abstract class AbstractEntity implements Serializable{

    @Temporal(TemporalType.TIMESTAMP)
    @Column(nullable = false)
    private Date CreatedDate;

    @PrePersist
    protected void onCreate() {
        UpdatedDate = CreatedDate = new Date();
    }

...
和我的对象/实体

@Entity
public class Trade extends AbstractEntity {
当我尝试使用我的存储库创建一个方法来
findByCreatedDateAfter(Date-Date)

我得到一个异常,该列找不到

public interface TradeRepository extends CrudRepository<Trade, Long>{

    public List<Trade> findByCreatedDateAfter(Date date);
}

我还想返回此期间某个金额列的
sum(amount)

查询派生机制需要应用标准Java属性命名约定。类中没有名为
createdDate
的属性
createdDate


要自定义到特定列的映射,请使用
@column
注释(即名称)。

很有趣,因此我遵循了在中看到的命名约定策略。将
abstract object
中的
CreatedDate
更改为
CreatedDate
,成功了。请您给我指出示例中使用大写属性名的域类,好吗?
Caused by: java.lang.IllegalArgumentException: Unable to locate Attribute  with the given name [createdDate] on this ManagedType [streaming.data.AbstractEntity]