Skip to content

error with @Query annotation #356

@jmdavid

Description

@jmdavid

When I try to use Query annotation:

public interface WorkflowInstanceRepository extends JpaRepository<WorkflowInstance, Long> {
@query("SELECT wi FROM WorkflowInstance wi WHERE wi.currentState = :currentState")
WorkflowVariableInstance findByCustomParams(@param("currentState") String currentState);
}

Entity is marked as followed:

@entity(name = "workflow_instance")
public class WorkflowInstance {
...
}

I get an error:
org.hibernate.hql.internal.ast.QuerySyntaxException: WorkflowInstance is not mapped

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions