2 Replies Latest reply on Aug 29, 2002 8:00 AM by Henning Voss

    collection delivered by Finder method contains more than jus

    Thomas Hollfelder Newbie

      Hello to all JBoss-Users and Developers,

      my problem:

      I have a finder method:
      * @ejb:finder signature="Collection findAllAufbauten()" unchecked="true" transaction-type="NotSupported"
      * query="SELECT OBJECT(a) from Aufbau a"

      and I use the Collection to access all the implict objects and get their data:
      localhome=(AufbauLocalHome)AufbauUtil.getLocalHome();
      } catch (NamingException ne) {
      throw new EJBException(ne);
      }
      Collection keys=null;
      try {
      keys= localhome.findAllAufbauten();
      } catch (FinderException fe) {
      throw new EJBException(fe);
      }
      ArrayList aufbauten=new ArrayList();
      Iterator iter=keys.iterator();
      AufbauLocal tmp=null;
      while (iter.hasNext()) {
      try {

      tmp=(AufbauLocal)localhome.findByPrimaryKey(iter.next().toString());
      } catch (FinderException fe) {
      throw new EJBException(fe);
      }
      Aufbau auf=tmp.getData();

      aufbauten.add(auf);

      But the Collection contains more than just the PK wich is a String. iter.next() delivers Aufbau:Kom and Aufbau:Kwe ... The Table and the pk-column are both named Aufbau.
      How can I fix that or is that something to configure somewhere?

      I run jboss 3.0 with Tomcat 4.0.3 and use Oracle 8i.

      Help appreciated,

      Thanks,

      Thomas