I have a case where my EntityHome is returning the wrong entity when I call getInstance(). When I view the debug page, it shows the instance
on StatusHome to be StatusType, instead of Status. The getInstance() method is not overridden and Home.getInstance() is used. Could it be that the type in the subclass (Status) isn't being enforced? This behavior doesn't even seem possible.
I have the following EntityHome object, with Status defined as the type:
@AutoCreate @Scope(ScopeType.CONVERSATION) @Name("statusHome") public class StatusHome extends HomeController<Status> { .... }
and HomeController is:
public abstract class HomeController<E extends AbstractEntity> extends EntityHome<E> { ... }
and from the Seam debug page:
Component (statusHome)
class class com.symcare.ids.admin.user.StatusHome
instance com.symcare.ids.core.model.stat.StatusType@22
Thanks for any ideas!
I dont know how your Status class looks like, but it may be worthwhile to look at the Home.createInstance method. This section of the code create your object to be managed by the HomeController.
Hope it helps