Changeset 5059
- Timestamp:
- Aug 19, 2009, 8:09:38 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/core/net/sf/basedb/core/log/db/AnnotationLogger.java
r5054 r5059 79 79 // Get the type of the parent item 80 80 AnnotationSetData as = annotation.getAnnotationSet(); 81 int itemType = 0;81 Integer itemType = null; 82 82 if (!Hibernate.isInitialized(as)) 83 83 { … … 92 92 } 93 93 94 // May happen in case the annotation set has been deleted in this transaction 95 if (itemType == null) return; 96 94 97 // Get the id of the parent item 95 98 String parentClass = Item.fromValue(itemType).getDataClass().getName(); … … 97 100 PredefinedQuery.getQueryString("DBLOG_GET_ITEMID_WITH_ANNOTATION", parentClass)); 98 101 q.setInteger("annotationSetId", as.getId()); 99 int parentId = (Integer)q.uniqueResult(); 102 Integer parentId = (Integer)q.uniqueResult(); 103 104 // May happen in case the parent item has been deleted in this transaction 105 if (parentId == null) return; 100 106 101 107 ChangeHistoryDetailData change = new ChangeHistoryDetailData();
Note: See TracChangeset
for help on using the changeset viewer.