Playframework 找不到模型的play2-ebean-命名查询用户。正在调查

Playframework 找不到模型的play2-ebean-命名查询用户。正在调查,playframework,playframework-2.0,ebean,Playframework,Playframework 2.0,Ebean,我正试图通过将原始sql查询放入orm.xml配置文件中来实现外部化 我遇到了一个错误: javax.persistence.PersistenceException:找不到模型的命名查询用户。正在调查 在播放2中,启用了ebean。我已经将orm.xml添加到conf目录中(我可以在类路径中找到它) Application.conf: ebean.default=“models.*” 从orm.xml中提取: <?xml version="1.0" encoding="UTF-8"?&

我正试图通过将原始sql查询放入orm.xml配置文件中来实现外部化

我遇到了一个错误:

javax.persistence.PersistenceException:找不到模型的命名查询用户。正在调查

在播放2中,启用了ebean。我已经将
orm.xml
添加到conf目录中(我可以在类路径中找到它)

Application.conf:

ebean.default=“models.*”

orm.xml
中提取:

<?xml version="1.0" encoding="UTF-8"?>
<entity-mappings>
    <entity class="models.Investigation">
        <raw-sql name="user">
            <columnMapping column="id" property="id" />
            <columnMapping column="title" property="title" />
            <columnMapping column="code" property="code" />
            <query>
            QUERY HERE
            </query>
        </raw-sql>
    </entity>
</entity-mappings>
找不到命名查询。知道会是什么吗?我在谷歌上搜索了几个小时,但没有结果

List<Investigation> investigations = Ebean.createNamedQuery(Investigation.class, "user").findList();