1 Reply Latest reply on Jan 15, 2010 4:27 PM by ivan.indrawan

    EntityHome not returning the correct instance

    monkeyden

      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!