brick / orm

Object-relational mapper for PHP 8 - Currently in development 🚧
10 stars 1 forks source link

Make 'id' property the identity property & autoincrement by default #2

Open BenMorel opened 5 years ago

BenMorel commented 5 years ago

If setIdentityProperty() has not been called after addEntity() during configuration, and the entity has an id property that's an int or a string, consider it an auto-increment identity field by default.

This will prevent overly verbose configuration files as most entities have such an ID.