Adapt to database with serial id