1 | public Serializable disassemble(↵ | | 1 | public Serializable disassemble(↵
|
2 | Object value,↵ | | 2 | Object value,↵
|
3 | SessionImplementor session,↵ | | 3 | SessionImplementor session,↵
|
4 | Object owner) ↵ | | 4 | Object owner)↵
|
5 | throws HibernateException {↵ | | 5 | throws HibernateException {↵
|
|
6 | if ( isNotEmbedded( session ) ) {↵ | | 6 | if ( isNotEmbedded(session) ) {↵
|
7 | return getIdentifierType( session ).disassemble( value, session, owner );↵ | | 7 | return getIdentifierType(session).disassemble(value, session, owner);↵
|
8 | }↵ | | 8 | }↵
|
9 | ↵ | | 9 | ↵
|
10 | if ( value == null ) {↵ | | 10 | if (value==null) {↵
|
11 | return null;↵ | | 11 | return null;↵
|
12 | }↵ | | 12 | }↵
|
13 | else {↵ | | 13 | else {↵
|
14 | // cache the actual id of the object, not the value of the↵ | | 14 | // cache the actual id of the object, not the value of the↵
|
15 | // property-ref, which might not be initialized↵ | | 15 | // property-ref, which might not be initialized↵
|
16 | Object id = ForeignKeys.getEntityIdentifierIfNotUnsaved( ↵ | | 16 | Object id = ForeignKeys.getEntityIdentifierIfNotUnsaved( ↵
|
17 | getAssociatedEntityName(), ↵ | | 17 | getAssociatedEntityName(), ↵
|
18 | value, ↵ | | 18 | value, ↵
|
19 | session↵ | | 19 | session↵
|
20 | );↵ | | 20 | );↵
|
21 | if ( id == null ) {↵ | | 21 | if (id==null) {↵
|
22 | throw new AssertionFailure(↵ | | 22 | throw new AssertionFailure(↵
|
23 | "cannot cache a reference to an object with a null id: " + ↵ | | 23 | "cannot cache a reference to an object with a null id: " + ↵
|
24 | getAssociatedEntityName()↵ | | 24 | getAssociatedEntityName() ↵
|
25 | );↵ | | 25 | );↵
|
26 | }↵ | | 26 | }↵
|
27 | return getIdentifierType( session ).disassemble( id, session, owner );↵ | | 27 | return getIdentifierType(session).disassemble(id, session, owner);↵
|
28 | | | 28 |
|