get id before insert