-
-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
type:featureNew feature.New feature.
Description
Currently, the cycle/annotated library doesn’t support insertable and updatable column attributes, which are useful for preventing specific fields from being included in INSERT or UPDATE queries (e.g., auto-incremented IDs, database-managed timestamps, or read-only fields).
In Doctrine, these are implemented as:
#[Column(insertable: false, updatable: false)]
private $id; Proposal:
Add similar attributes to Cycle\Annotated’s Column
#[Column(insertable: false)] // Excludes from INSERT
#[Column(updatable: false)] // Excludes from UPDATE Use Cases:
- Auto-increment fields that should not be manually inserted.
- Database-managed fields (e.g., created_at, updated_at).
- Read-only fields fetched from triggers or views.
Would this be feasible to implement? I’m happy to help with a PR if the maintainers agree on the approach.
Metadata
Metadata
Assignees
Labels
type:featureNew feature.New feature.