1 | while ( iter.hasNext() ) {↵ | | 1 | while ( iter.hasNext() ) {↵
|
2 | Map.Entry me = (Map.Entry) iter.next();↵ | | 2 | ↵
|
3 | CollectionEntry collectionEntry = (CollectionEntry) me.getValue();↵ | | |
|
4 | PersistentCollection persistentCollection = (PersistentCollection) me.getKey();↵ | | |
|
5 | collectionEntry.postFlush(persistentCollectio↵ | | 3 | Property prop = (Property) iter.next();↵
|
| | | 4 | Integer join = new Integer( persistentClass.getJoinNumber(prop) );↵
|
6 | n);↵ | | 5 | propertyJoinNumbers.add(join);↵
|
|
7 | if ( collectionEntry.getLoadedPersister() == null ) {↵ | | 6 | ↵
|
8 | //if the collection is dereferenced, remove from the session cache↵ | | |
|
9 | //iter.remove(); //does not work, since the entrySet is not backed by the set↵ | | |
|
10 | persistenceContext.getCollectionEntries()↵ | | |
|
11 | .remove(persistentCollection);↵ | | |
|
12 | }↵ | | |
|
13 | else {↵ | | |
|
14 | //otherwise recreate the mapping between the collection and its key↵ | | 7 | //propertyTableNumbersByName.put( prop.getName(), join );↵
|
| | | 8 | propertyTableNumbersByNameAndSubclass.put( ↵
|
| | | 9 | prop.getPersistentClass().getEntityName() + '.' + prop.getName(), ↵
|
| | | 10 | join ↵
|
| | | 11 | );↵
|
|
| | | 12 | Iterator citer = prop.getColumnIterator();↵
|
| | | 13 | while ( citer.hasNext() ) {↵
|
15 | CollectionKey collectionKey = new CollectionKey( ↵ | | 14 | Select↵
|
16 | collectionEntry.getLoadedPersister(), ↵ | | |
|
17 | collectionEntry.getLoadedKey(), ↵ | | |
|
18 | session.getEntityMode() ↵ | | 15 | able thing = (Selectable) citer.next();↵
|
| | | 16 | if ( thing.isFormula() ) {↵
|
| | | 17 | formulaJoinedNumbers.add(join);↵
|
19 | );↵ | | 18 | }↵
|
20 | persistenceContext.getCollectionsByKey()↵ | | 19 | ↵
|
21 | .put(collectionKey, persistentCollection);↵ | | 20 | else {↵
|
| | | 21 | columnJoinNumbers.add(join);↵
|
| | | 22 | }↵
|
22 | }↵ | | 23 | }↵
|
23 | } | | 24 | }
|