Description
To replicate, run this script:
project --topLevelPackage com.example
jpa setup --database HYPERSONIC_IN_MEMORY --provider HIBERNATE
entity jpa --class ~.domain.Thing
field string name
web jsf setup
web jsf all --package ~.web
entity jpa --class ~.domain.Owner
focus --class ~.domain.Thing
field reference --fieldName owner --type ~.domain.Owner
The ITD ThingBean_Roo_ManagedBean.aj contains this method:
public List<Owner> ThingBean.completeOwner(java.lang.String query) { List<Owner> suggestions = new ArrayList<Owner>(); for (Owner owner : Owner.findAllOwners()) { String ownerStr = owner.getEntityManager() + " " + owner.getId() + " " + owner.getVersion(); if (ownerStr.toLowerCase().startsWith(query.toLowerCase())) { suggestions.add(owner); } } return suggestions; }
It seems wrong to be referencing the EntityManager at all here, let alone calling toString() on it. I've logged this as a bug because my multimodule JSF/MVC project fails to compile (in Maven) at this line.