more db fixes
properly load database context when loading doc summary
editing now works