This still isn't working.
The result is
Code:
mysql> select * from child;
+----+------+----------+-----------+
| id | name | position | parent_id |
+----+------+----------+-----------+
| 1 | NULL | NULL | 1 |
| 2 | NULL | NULL | 1 |
+----+------+----------+-----------+
instead of:
Code:
mysql> select * from child;
+----+------+----------+-----------+
| id | name | position | parent_id |
+----+------+----------+-----------+
| 1 | NULL | 1 | 1 |
| 2 | NULL | 2 | 1 |
+----+------+----------+-----------+
-
Working: IndexColumn does work for value type collections
-
Working: IndexColumn does work for entities where the index column is NOT mapped as a property in the associated class. (which is the second example of
2.4.6.2.3.).
-
Working: Populating Arraylist from a DB works for entities where the index column IS mapped as a property in the associated class. (which is the first example of
2.4.6.2.3.). So when you have the positions already set in the db, Hibernate will populate the ArrayList in the correct order.
-
NOT Working: Updating/setting the IndexColum in the DB does NOT work for entities where the index column IS mapped as a property in the associated class. (which is the first example of
2.4.6.2.3.). The index column will stay 0 or null, instead of being the index of the arraylist.
Can anybody clarify this?