Hello, the following working code gives an error: 'select expected, eg select....etc'
Query query = entityManager.createQuery("from Registrant where membershipId = :membershipId");
However, this code works fine and without problems.
When putting the following line after it:
query.setParameter("membershipId", membershipId);
IntelliJ gives an error: Cannot resolve query parameter...
When using the query:
Query query = entityManager.createQuery("select r from Registrant r where r.membershipId = :membershipId");
IntelliJ doesn't give any problems, but why is the other syntax wrong?