String values in where in JPQL query

Hi

I create simple query like below

select r from xxx$StorageXXXX r where r.article.id = 201 and r.batch_code = '19906' and r.store.id = 1

and I give exception

The state field path 'r.batch_code' cannot be resolved to a valid type.

Column batch_code is string type.

@Column(name = "BATCH_CODE", length = 50)
	protected String batchCode;

What is wrong in this query notation ?

Try using r.batchCode (the name of the object property) rather than r.batch_code (the name of the database field).

Of course, I perpetratied stupid mistakes. Thanks !