Commits

Greg Slepak committed ea5a7cb

added refind to DB.OBJ

Comments (0)

Files changed (1)

example-site/dragonfly-framework/plugins-inactive/db/database_orm.lsp

 	     'revert-set (assoc-row-with-db db (format DBOBJ_SELECT_SQL (join (map first revert-set) ",") table finder))
 	     'change-set revert-set))
 
-; returns true on successfull update, 0 if no update was needed, or nil if update failed
+(define (DB.OBJ:refind _finder)
+	(setf finder _finder)
+	(when (integer? finder) (setf finder (string DBOBJ_ROWID_COL finder)))
+	(DB.OBJ:refetch)
+)
+
+; returns true on successful update, 0 if no update was needed, or nil if update failed
 (define (DB.OBJ:save , diff)
 	(if (null? (setf diff (difference change-set revert-set)))
 		0