DDC-3832: readOnly should be renamed to immutable in the mapping #4693

Open
opened 2026-01-22 14:47:44 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Jul 16, 2015).

Originally assigned to: @Ocramius on GitHub.

Jira issue originally created by user stof:

readOnly in the mapping is currently very confusing. Some people are using it to map entities to views, and then complain about SchemaTool-based projects (migrations for instance) because it handles things as table.
But this is not the actual meaning of this mapping flag. Read-only entities can be inserted and deleted. The only forbidden action on them are updates. This makes the naming totally unsuited.

For reference, Hibernate uses "mutable=false" for the feature corresponding to our "readOnly=true".

Originally created by @doctrinebot on GitHub (Jul 16, 2015). Originally assigned to: @Ocramius on GitHub. Jira issue originally created by user stof: `readOnly` in the mapping is currently very confusing. Some people are using it to map entities to views, and then complain about SchemaTool-based projects (migrations for instance) because it handles things as table. But this is **not** the actual meaning of this mapping flag. Read-only entities can be inserted and deleted. The only forbidden action on them are updates. This makes the naming totally unsuited. For reference, Hibernate uses "mutable=false" for the feature corresponding to our "readOnly=true".
admin added the Improvement label 2026-01-22 14:47:44 +01:00
Author
Owner

@Ma27 commented on GitHub (Jul 14, 2016):

@Ocramius is it still relevant for 3.0? If so, I'd give it a try in the next days :)

@Ma27 commented on GitHub (Jul 14, 2016): @Ocramius is it still relevant for 3.0? If so, I'd give it a try in the next days :)
Author
Owner

@Ocramius commented on GitHub (Jul 14, 2016):

Unlikely: the benefit of a rename is next to 0, and it is just one more BC break

@Ocramius commented on GitHub (Jul 14, 2016): Unlikely: the benefit of a rename is next to 0, and it is just one more BC break
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4693