User: dsundstrom
  Date: 01/12/17 10:59:13

  Modified:    src/main/org/jboss/ejb/plugins/cmp/jdbc
                        JDBCAbstractQueryCommand.java
  Log:
  Fixed bug #490187 where ejbSelect methods that selected entities would
  always return entites of the type on which the ejbSelect was defined. This
  was a big problem if you were trying to select another entity type.
  
  Revision  Changes    Path
  1.3       +5 -2      
jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/JDBCAbstractQueryCommand.java
  
  Index: JDBCAbstractQueryCommand.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/JDBCAbstractQueryCommand.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JDBCAbstractQueryCommand.java     2001/12/01 21:55:04     1.2
  +++ JDBCAbstractQueryCommand.java     2001/12/17 18:59:13     1.3
  @@ -42,7 +42,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Marc Fleury</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Joe Shevland</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Justin Forder</a>
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    */
   public abstract class JDBCAbstractQueryCommand implements JDBCQueryCommand {
      private JDBCStoreManager manager;
  @@ -146,8 +146,11 @@
         // This is an ejbSelect, so we need to convert the pks to real ejbs.
         EntityContainer container = manager.getContainer();
         if(queryMetaData.isResultTypeMappingLocal()) {
  +         JDBCStoreManager selectManager = selectEntity.getManager();
  +
            LocalContainerInvoker localInvoker;
  -         localInvoker = container.getLocalContainerInvoker();
  +         localInvoker = selectManager.getContainer().getLocalContainerInvoker();
  +
            return localInvoker.getEntityLocalCollection(finderResults);
         } else {
            ContainerInvoker invoker;
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to