Details
Description
If I specify and identifierField with a value other than "id" the <entity>_Roo_Entity.aj file has an error. For example, if I specify the following annotation on an entity named Document:
@RooEntity(identifierField = "tid")
the file Document_Roo_Entity.aj is modified to have the following code snippet:
@Transactional
public static Document Document.findDocument(Long id) {
if (id == null) return null;
Query query = entityManager().createQuery("select o from Document o where o.tid = :id").setParameter("id",tid);
The parameter to the findDocument as well as the if statement should use the tid variable name. The same situation will be encountered if I use the --indentifierField option on the entity roo command.