Uploaded image for project: 'S2Container'
  1. S2Container
  2. CONTAINER-147

S2JDBCの一対多関連定義で、leftOuterJoinを使用したとき取得されないデータがある

XMLWordPrintable

    • Type: Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Priority: Icon: Major Major
    • None
    • Affects Version/s: 2.4.19
    • Component/s: S2-Tiger
    • None
    • Environment:
      java version "1.5.0_13"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-241)
      Java HotSpot(TM) Client VM (build 1.5.0_13-121, mixed mode, sharing)

      ---------------------------------------------------------
      @Entity
      public class Employee {
      @Id
      @GeneratedValue(strategy = GenerationType.SEQUENCE)
      public Integer id;

      public Integer departementId;

      @ManyToOne
      public Department department;
      }

      public class Department {
      ...
      @OneToMany(mappedBy = "department")
      public List<Employee> employeeList;
      }
      ---------------------------------------------------------

      List<Department> results = jdbcManager.from(Department.class)
      .leftOuterJoin("employee")
      .getResultList();

      以上のようなコードでemployeeが0件のdepartmentが取得できていないようです。
      S2JDBCのログのSQLをツールから手動で流すと、該当のデータは
      employeeは全てnullですが、departmentのフィールドは取得できています。

            Assignee:
            higa higa
            Reporter:
            agata agata
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: