wrapping/unwrapping primary keys