This is an automated email from the ASF dual-hosted git repository.

matrei pushed a commit to branch deprecate-for-removal
in repository https://gitbox.apache.org/repos/asf/grails-core.git

commit 4d0d9d00d68be91fc40253ef93c84dde6415a3f2
Author: Mattias Reichel <[email protected]>
AuthorDate: Thu Feb 26 15:53:38 2026 +0100

    deprecate: PropertyConfig.updateable
    
    Update docs and usages to the preferred `updatable`
    property name.
    
    Cheap to keep backwards compatibility,
    so no urgent need to remove.
---
 .../org/grails/orm/hibernate/cfg/PropertyConfig.groovy      |  5 +++--
 .../hibernate/mapping/HibernateMappingBuilderTests.groovy   | 13 ++++++++++++-
 grails-doc/src/en/guide/index.adoc                          |  6 +++---
 grails-doc/src/en/guide/reference.adoc                      |  4 ++--
 grails-doc/src/en/ref/Database Mapping/insertable.adoc      |  4 ++--
 .../Database Mapping/{updateable.adoc => updatable.adoc}    | 10 +++++-----
 6 files changed, 27 insertions(+), 15 deletions(-)

diff --git 
a/grails-data-hibernate5/core/src/main/groovy/org/grails/orm/hibernate/cfg/PropertyConfig.groovy
 
b/grails-data-hibernate5/core/src/main/groovy/org/grails/orm/hibernate/cfg/PropertyConfig.groovy
index 763d0d0f55..850a305804 100644
--- 
a/grails-data-hibernate5/core/src/main/groovy/org/grails/orm/hibernate/cfg/PropertyConfig.groovy
+++ 
b/grails-data-hibernate5/core/src/main/groovy/org/grails/orm/hibernate/cfg/PropertyConfig.groovy
@@ -100,7 +100,7 @@ class PropertyConfig extends Property {
      *
      * @deprecated Use updatable instead
      */
-    @Deprecated
+    @Deprecated // Cheap to keep around for backwards compatibility
     boolean getUpdateable() {
         return updatable
     }
@@ -109,7 +109,7 @@ class PropertyConfig extends Property {
      * Whether or not this column is updatable by hibernate
      * @deprecated Use updatable instead
      */
-    @Deprecated
+    @Deprecated // Cheap to keep around for backwards compatibility
     void setUpdateable(boolean updateable) {
         this.updatable = updateable
     }
@@ -444,6 +444,7 @@ class PropertyConfig extends Property {
     }
 
     String toString() {
+        // TODO(Grails 8): updateable -> updatable
         "property[type:$type, lazy:$lazy, columns:$columns, 
insertable:${insertable}, updateable:${updatable}]"
     }
 
diff --git 
a/grails-data-hibernate5/core/src/test/groovy/grails/gorm/hibernate/mapping/HibernateMappingBuilderTests.groovy
 
b/grails-data-hibernate5/core/src/test/groovy/grails/gorm/hibernate/mapping/HibernateMappingBuilderTests.groovy
index 6b2361ff99..ec22c953c9 100644
--- 
a/grails-data-hibernate5/core/src/test/groovy/grails/gorm/hibernate/mapping/HibernateMappingBuilderTests.groovy
+++ 
b/grails-data-hibernate5/core/src/test/groovy/grails/gorm/hibernate/mapping/HibernateMappingBuilderTests.groovy
@@ -842,7 +842,7 @@ class HibernateMappingBuilderTests {
     }
 
     @Test
-    void testUpdatablePropertyConfig() {
+    void testUpdateablePropertyConfig() {
         def builder = new HibernateMappingBuilder("Foo")
         def mapping = builder.evaluate {
             firstName updateable:true
@@ -852,6 +852,17 @@ class HibernateMappingBuilderTests {
         assertFalse mapping.getPropertyConfig('lastName').updateable
     }
 
+    @Test
+    void testUpdatablePropertyConfig() {
+        def builder = new HibernateMappingBuilder("Foo")
+        def mapping = builder.evaluate {
+            firstName updatable:true
+            lastName updatable:false
+        }
+        assertTrue mapping.getPropertyConfig('firstName').updatable
+        assertFalse mapping.getPropertyConfig('lastName').updatable
+    }
+
     @Test
     void testDefaultValue() {
         def builder = new HibernateMappingBuilder("Foo")
diff --git a/grails-doc/src/en/guide/index.adoc 
b/grails-doc/src/en/guide/index.adoc
index 0f32264d6b..e375a7be19 100644
--- a/grails-doc/src/en/guide/index.adoc
+++ b/grails-doc/src/en/guide/index.adoc
@@ -1760,10 +1760,10 @@ include::ref/Database Mapping/table.adoc[]
 
 include::ref/Database Mapping/type.adoc[]
 
-[[ref-database-mapping-updateable]]
-==== updateable
+[[ref-database-mapping-updatable]]
+==== updatable
 
-include::ref/Database Mapping/updateable.adoc[]
+include::ref/Database Mapping/updatable.adoc[]
 
 [[ref-database-mapping-version]]
 ==== version
diff --git a/grails-doc/src/en/guide/reference.adoc 
b/grails-doc/src/en/guide/reference.adoc
index 21bf0e1617..7597ccb630 100644
--- a/grails-doc/src/en/guide/reference.adoc
+++ b/grails-doc/src/en/guide/reference.adoc
@@ -565,10 +565,10 @@ include::ref/Database Mapping/table.adoc[]
 
 include::ref/Database Mapping/type.adoc[]
 
-[[ref-database-mapping-updateable]]
+[[ref-database-mapping-updatable]]
 ==== updateable
 
-include::ref/Database Mapping/updateable.adoc[]
+include::ref/Database Mapping/updatable.adoc[]
 
 [[ref-database-mapping-version]]
 ==== version
diff --git a/grails-doc/src/en/ref/Database Mapping/insertable.adoc 
b/grails-doc/src/en/ref/Database Mapping/insertable.adoc
index e06831eb54..13d875c2ca 100644
--- a/grails-doc/src/en/ref/Database Mapping/insertable.adoc    
+++ b/grails-doc/src/en/ref/Database Mapping/insertable.adoc    
@@ -41,7 +41,7 @@ class Book {
 
     static mapping = {
         author insertable: false
-        author updateable: false
+        author updatable: false
     }
 }
 ----
@@ -54,7 +54,7 @@ Usage: `association_name(insertable: boolean)`
 
 Useful in general where you don't want to set an initial value (or include the 
column in the generated SQL) during an initial `save()`.
 
-In particular this is useful for one-to-many relationships. For example when 
you store the foreign key in the 'child' table, it's often efficient to save 
the child using only the foreign key of the parent. You do this by setting the 
parent object (and the parent foreign key) in the 'child' entity. Setting the 
attributes insertable:false and updateable:false for the 'belongsTo' parent 
object lets you insert and update using only the foreign key.
+In particular this is useful for one-to-many relationships. For example when 
you store the foreign key in the 'child' table, it's often efficient to save 
the child using only the foreign key of the parent. You do this by setting the 
parent object (and the parent foreign key) in the 'child' entity. Setting the 
attributes insertable:false and updatable:false for the 'belongsTo' parent 
object lets you insert and update using only the foreign key.
 
 [source,groovy]
 ----
diff --git a/grails-doc/src/en/ref/Database Mapping/updateable.adoc 
b/grails-doc/src/en/ref/Database Mapping/updatable.adoc
similarity index 86%
rename from grails-doc/src/en/ref/Database Mapping/updateable.adoc
rename to grails-doc/src/en/ref/Database Mapping/updatable.adoc
index 5e2a8aefed..6aeb4c30f8 100644
--- a/grails-doc/src/en/ref/Database Mapping/updateable.adoc    
+++ b/grails-doc/src/en/ref/Database Mapping/updatable.adoc     
@@ -18,7 +18,7 @@ under the License.
 ////
 
 
-== updateable
+== updatable
 
 
 
@@ -41,7 +41,7 @@ class Book {
 
     static mapping = {
         author insertable: false
-        author updateable: false
+        author updatable: false
     }
 }
 ----
@@ -50,15 +50,15 @@ class Book {
 === Description
 
 
-Usage: `association_name(updateable: boolean)`
+Usage: `association_name(updatable: boolean)`
 
 Useful in general where you don't want to update a value (or include the 
column in the generated SQL) during a `save()`.
 
-In particular this is useful for one-to-many relationships. For example when 
you store the foreign key in the 'child' table, it's often efficient to save 
the child using only the foreign key of the parent. You do this by setting the 
parent object (and the parent foreign key) in the 'child' entity. Setting the 
attributes insertable:false and updateable:false for the 'belongsTo' parent 
object lets you insert and update using only the foreign key.
+In particular this is useful for one-to-many relationships. For example when 
you store the foreign key in the 'child' table, it's often efficient to save 
the child using only the foreign key of the parent. You do this by setting the 
parent object (and the parent foreign key) in the 'child' entity. Setting the 
attributes insertable:false and updatable:false for the 'belongsTo' parent 
object lets you insert and update using only the foreign key.
 
 [source,groovy]
 ----
 static mapping = {
-    author updateable: false
+    author updatable: false
 }
 ----

Reply via email to