2 Replies Latest reply on Mar 7, 2008 3:48 PM by asavitsky

    EntityQuery.dataModel - broken!

      It seems that the dataModel property for EntityQuery is completely broken, at least for conversation-scoped queries. Here's a simple example:


      components.xml:
      <framework:entity-query name="data" scope="conversation" ejbql="FROM Data" order="value" />


      Data is a simple entity class with properties id and value, nothing special...


      index.xhtml (I use Facelets, though I doubt it's related):
      <h:dataTable value="#{data.dataModel}" var="dataItem">
           <h:column>
                <h:outputText value="#{dataItem.value}" />
           </h:column>
      </h:dataTable>


      Simple enough, eh? Except that no data is displayed (though it's retrieved - I verified this by


      Using the resultList property instead of dataModel works fine; so does changing the scope of query from conversation to session.


      Is this a bug? Am I using the dataModel property in an improper way?


      Thanks,


      Alex

        • 1. Re: EntityQuery.dataModel - broken!
          matt.drees

          I'd call it a bug, yes, but it hasn't been addressed yet.
          The relevant jira issues are JBSEAM-1814 and JBSEAM-2221.  Feel free to vote on jira.

          • 2. Re: EntityQuery.dataModel - broken!

            Voted on the issue 1814 - thanks Matt, I didn't know this was already created.


            To be honest, this is not the first time I get burned by the ManagedEntityIdentityInterceptor, so this keeps me wondering, what's the purpose of it, anyway? Frankly, I don't see anything fundamentally wrong with conversation-scoped queries - in fact, all my Seam apps use them in exactly this way - and the MEII is nothing more than an annoyance to this setup: first it was nulling the resultList, now it's dataModel, restrictions, you name it...