From 9c5c117ee32724e1475571a29186eaf8545f8f11 Mon Sep 17 00:00:00 2001 From: Adrian Cojocariu Date: Fri, 4 Apr 2025 14:27:10 +0300 Subject: [PATCH 01/12] Umbraco UI Builder release notes and details on entity identifier converters. --- .../entity-identifier-converters.md | 36 +++++++++++++++++++ 13/umbraco-ui-builder/release-notes.md | 4 +++ .../entity-identifier-converters.md | 36 +++++++++++++++++++ 15/umbraco-ui-builder/release-notes.md | 9 +++++ 4 files changed, 85 insertions(+) create mode 100644 13/umbraco-ui-builder/collections/entity-identifier-converters.md create mode 100644 15/umbraco-ui-builder/collections/entity-identifier-converters.md diff --git a/13/umbraco-ui-builder/collections/entity-identifier-converters.md b/13/umbraco-ui-builder/collections/entity-identifier-converters.md new file mode 100644 index 00000000000..b67ee21b308 --- /dev/null +++ b/13/umbraco-ui-builder/collections/entity-identifier-converters.md @@ -0,0 +1,36 @@ +--- +description: Using Umbraco entities as reference with an UI Builder collection +--- + +# Entity Identifier Converters + +Umbraco stores identifiers in UDI format for most Umbraco object types. + +You can read more about them in the [UDI Identifiers](../../umbraco-cms/reference/querying/udi-identifiers.md) section of the documentation. + +If you want to use in your model a reference to an Umbraco object and retrieve the `Integer` or `Guid` value of it, you would need to apply a conversion process to the `UDI` value. + +To achieve that you will need to use one of UI Builder's converters - `EntityIdentifierToIntTypeConverter` or `EntityIdentifierToGuidTypeConverter` - and add it as a `[TypeConverterAttribute]` to your model's foreign key property. + +An entity that references an Umbraco object would look like this: + +```csharp + [TableName(TableName)] + [PrimaryKey("Id")] + public class MemberReview + { + public const string TableName = "MemberReview"; + + [PrimaryKeyColumn] + public int Id { get; set; } + + public string Title { get; set; } + + public string Content { get; set; } + + [TypeConverter(typeof(EntityIdentifierToIntTypeConverter))] + public int MemberId { get; set; } + } +``` + +You can also define and use your own custom type converter and UI Builder will take care of the data persistence. diff --git a/13/umbraco-ui-builder/release-notes.md b/13/umbraco-ui-builder/release-notes.md index 3cf738d41f2..4102f028360 100644 --- a/13/umbraco-ui-builder/release-notes.md +++ b/13/umbraco-ui-builder/release-notes.md @@ -18,6 +18,10 @@ If you are upgrading to a new major version, check the breaking changes in the [ This section contains the release notes for Umbraco UI Builder 13 including all changes for this version. +#### [**13.2.3**](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F13.2.3) **(April 4th 2025)** + +* Removed global registration of `UDI` converters [#144](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/144) and introduce new [Entity Identifier Converters](./collections/entity-identifier-converters.md) . + #### [**13.2.2**](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F13.2.2) **(March 21st 2025)** * Fixed an issue for bulk actions that disabled the actions row on cancel [#130](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/130) diff --git a/15/umbraco-ui-builder/collections/entity-identifier-converters.md b/15/umbraco-ui-builder/collections/entity-identifier-converters.md new file mode 100644 index 00000000000..b67ee21b308 --- /dev/null +++ b/15/umbraco-ui-builder/collections/entity-identifier-converters.md @@ -0,0 +1,36 @@ +--- +description: Using Umbraco entities as reference with an UI Builder collection +--- + +# Entity Identifier Converters + +Umbraco stores identifiers in UDI format for most Umbraco object types. + +You can read more about them in the [UDI Identifiers](../../umbraco-cms/reference/querying/udi-identifiers.md) section of the documentation. + +If you want to use in your model a reference to an Umbraco object and retrieve the `Integer` or `Guid` value of it, you would need to apply a conversion process to the `UDI` value. + +To achieve that you will need to use one of UI Builder's converters - `EntityIdentifierToIntTypeConverter` or `EntityIdentifierToGuidTypeConverter` - and add it as a `[TypeConverterAttribute]` to your model's foreign key property. + +An entity that references an Umbraco object would look like this: + +```csharp + [TableName(TableName)] + [PrimaryKey("Id")] + public class MemberReview + { + public const string TableName = "MemberReview"; + + [PrimaryKeyColumn] + public int Id { get; set; } + + public string Title { get; set; } + + public string Content { get; set; } + + [TypeConverter(typeof(EntityIdentifierToIntTypeConverter))] + public int MemberId { get; set; } + } +``` + +You can also define and use your own custom type converter and UI Builder will take care of the data persistence. diff --git a/15/umbraco-ui-builder/release-notes.md b/15/umbraco-ui-builder/release-notes.md index 5ecef9e54a7..abdce91cd14 100644 --- a/15/umbraco-ui-builder/release-notes.md +++ b/15/umbraco-ui-builder/release-notes.md @@ -18,6 +18,15 @@ If you are upgrading to a new major version, check the breaking changes in the [ Below are the release notes for Umbraco UI Builder 15, detailing all changes in this version. +#### [**15.1.2**](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F15.1.2) **(April 4th 2025)** + +* Removed global registration of `UDI` converters [#144](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/144), [#136](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/136) and introduce new [Entity Identifier Converters](./collections/entity-identifier-converters.md) . +* Fixed `Create` action button [#137](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/137) +* Add collection list view refresh feature following an entity action [#139](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/139) +* Fixed collection visibility [#134](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/134) +* Enable rendering of sidebar properties. +* Fixed an issue that prevented the creation of multiple sections. + #### [**15.1.1**](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F15.1.1) **(March 21st 2025)** * Extended `UdiConverter` with options to convert to `GUID` [#108](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/108) From b8952651f818121d7f59dcd11aa8efd83c573449 Mon Sep 17 00:00:00 2001 From: Adrian Cojocariu Date: Mon, 7 Apr 2025 10:16:33 +0300 Subject: [PATCH 02/12] Update summary for entity identifier converters --- 13/umbraco-ui-builder/SUMMARY.md | 1 + 15/umbraco-ui-builder/SUMMARY.md | 1 + 2 files changed, 2 insertions(+) diff --git a/13/umbraco-ui-builder/SUMMARY.md b/13/umbraco-ui-builder/SUMMARY.md index 3423f807237..6cda5d6211b 100644 --- a/13/umbraco-ui-builder/SUMMARY.md +++ b/13/umbraco-ui-builder/SUMMARY.md @@ -46,6 +46,7 @@ * [Child Collection Groups](collections/child-collection-groups.md) * [Retrieve Child Collections](collections/retrieve-child-collections.md) * [Related Collections](collections/related-collections.md) +* [Entity Identifier Converters](collections/entity-identifier-converters.md) ## Searching diff --git a/15/umbraco-ui-builder/SUMMARY.md b/15/umbraco-ui-builder/SUMMARY.md index d7d8f48bef3..f52e3e3a763 100644 --- a/15/umbraco-ui-builder/SUMMARY.md +++ b/15/umbraco-ui-builder/SUMMARY.md @@ -43,6 +43,7 @@ * [Child Collection Groups](collections/child-collection-groups.md) * [Retrieve Child Collections](collections/retrieve-child-collections.md) * [Related Collections](collections/related-collections.md) +* [Entity Identifier Converters](collections/entity-identifier-converters.md) ## Searching From eeed30dabed5b3fbe0561bf14c56e33dd1b65b6e Mon Sep 17 00:00:00 2001 From: Esha Noronha <82437098+eshanrnh@users.noreply.github.com> Date: Mon, 7 Apr 2025 10:23:05 +0200 Subject: [PATCH 03/12] Update 15/umbraco-ui-builder/release-notes.md --- 15/umbraco-ui-builder/release-notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/15/umbraco-ui-builder/release-notes.md b/15/umbraco-ui-builder/release-notes.md index abdce91cd14..fe6253a9055 100644 --- a/15/umbraco-ui-builder/release-notes.md +++ b/15/umbraco-ui-builder/release-notes.md @@ -20,7 +20,7 @@ Below are the release notes for Umbraco UI Builder 15, detailing all changes in #### [**15.1.2**](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F15.1.2) **(April 4th 2025)** -* Removed global registration of `UDI` converters [#144](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/144), [#136](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/136) and introduce new [Entity Identifier Converters](./collections/entity-identifier-converters.md) . +* Removed global registration of `UDI` converters [#144](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/144), [#136](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/136), and introduced new [Entity Identifier Converters](./collections/entity-identifier-converters.md). * Fixed `Create` action button [#137](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/137) * Add collection list view refresh feature following an entity action [#139](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/139) * Fixed collection visibility [#134](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/134) From 49ffb722bf1884326406e0e9c48c1777ef1a32b3 Mon Sep 17 00:00:00 2001 From: Esha Noronha <82437098+eshanrnh@users.noreply.github.com> Date: Mon, 7 Apr 2025 10:23:13 +0200 Subject: [PATCH 04/12] Update 15/umbraco-ui-builder/collections/entity-identifier-converters.md --- .../collections/entity-identifier-converters.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/15/umbraco-ui-builder/collections/entity-identifier-converters.md b/15/umbraco-ui-builder/collections/entity-identifier-converters.md index b67ee21b308..dbf1ad353fe 100644 --- a/15/umbraco-ui-builder/collections/entity-identifier-converters.md +++ b/15/umbraco-ui-builder/collections/entity-identifier-converters.md @@ -33,4 +33,4 @@ An entity that references an Umbraco object would look like this: } ``` -You can also define and use your own custom type converter and UI Builder will take care of the data persistence. +You can also create a custom type converter. UI Builder will handle data persistence automatically. From 1b1999594390128fc9ddad0d88aef80da054dc74 Mon Sep 17 00:00:00 2001 From: Esha Noronha <82437098+eshanrnh@users.noreply.github.com> Date: Mon, 7 Apr 2025 10:23:20 +0200 Subject: [PATCH 05/12] Update 15/umbraco-ui-builder/collections/entity-identifier-converters.md --- .../collections/entity-identifier-converters.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/15/umbraco-ui-builder/collections/entity-identifier-converters.md b/15/umbraco-ui-builder/collections/entity-identifier-converters.md index dbf1ad353fe..657895a79f7 100644 --- a/15/umbraco-ui-builder/collections/entity-identifier-converters.md +++ b/15/umbraco-ui-builder/collections/entity-identifier-converters.md @@ -10,7 +10,7 @@ You can read more about them in the [UDI Identifiers](../../umbraco-cms/referenc If you want to use in your model a reference to an Umbraco object and retrieve the `Integer` or `Guid` value of it, you would need to apply a conversion process to the `UDI` value. -To achieve that you will need to use one of UI Builder's converters - `EntityIdentifierToIntTypeConverter` or `EntityIdentifierToGuidTypeConverter` - and add it as a `[TypeConverterAttribute]` to your model's foreign key property. +Use one of UI Builder's converters - `EntityIdentifierToIntTypeConverter` or `EntityIdentifierToGuidTypeConverter`. Add it as a `[TypeConverterAttribute]` to your model's foreign key property. An entity that references an Umbraco object would look like this: From 51f7861f00d541b21f3d1931ef4014c00ee97059 Mon Sep 17 00:00:00 2001 From: Esha Noronha <82437098+eshanrnh@users.noreply.github.com> Date: Mon, 7 Apr 2025 10:23:29 +0200 Subject: [PATCH 06/12] Update 15/umbraco-ui-builder/collections/entity-identifier-converters.md --- .../collections/entity-identifier-converters.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/15/umbraco-ui-builder/collections/entity-identifier-converters.md b/15/umbraco-ui-builder/collections/entity-identifier-converters.md index 657895a79f7..a1cb38c5447 100644 --- a/15/umbraco-ui-builder/collections/entity-identifier-converters.md +++ b/15/umbraco-ui-builder/collections/entity-identifier-converters.md @@ -8,7 +8,7 @@ Umbraco stores identifiers in UDI format for most Umbraco object types. You can read more about them in the [UDI Identifiers](../../umbraco-cms/reference/querying/udi-identifiers.md) section of the documentation. -If you want to use in your model a reference to an Umbraco object and retrieve the `Integer` or `Guid` value of it, you would need to apply a conversion process to the `UDI` value. +If you want to reference an Umbraco object in your model and retrieve its `Integer` or `Guid` value, you must convert the `UDI` value. Use one of UI Builder's converters - `EntityIdentifierToIntTypeConverter` or `EntityIdentifierToGuidTypeConverter`. Add it as a `[TypeConverterAttribute]` to your model's foreign key property. From 72978246f435440a5b7e06fa6bb80d55470be387 Mon Sep 17 00:00:00 2001 From: Esha Noronha <82437098+eshanrnh@users.noreply.github.com> Date: Mon, 7 Apr 2025 10:23:36 +0200 Subject: [PATCH 07/12] Update 13/umbraco-ui-builder/release-notes.md --- 13/umbraco-ui-builder/release-notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/13/umbraco-ui-builder/release-notes.md b/13/umbraco-ui-builder/release-notes.md index 4102f028360..1b18025785d 100644 --- a/13/umbraco-ui-builder/release-notes.md +++ b/13/umbraco-ui-builder/release-notes.md @@ -20,7 +20,7 @@ This section contains the release notes for Umbraco UI Builder 13 including all #### [**13.2.3**](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F13.2.3) **(April 4th 2025)** -* Removed global registration of `UDI` converters [#144](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/144) and introduce new [Entity Identifier Converters](./collections/entity-identifier-converters.md) . +* Removed global registration of `UDI` converters [#144](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/144) and introduced new [Entity Identifier Converters](./collections/entity-identifier-converters.md) . #### [**13.2.2**](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F13.2.2) **(March 21st 2025)** From 833a4ae148eb9ea55b68b8a0040b4a67a3d7aff2 Mon Sep 17 00:00:00 2001 From: Esha Noronha <82437098+eshanrnh@users.noreply.github.com> Date: Mon, 7 Apr 2025 10:23:42 +0200 Subject: [PATCH 08/12] Update 13/umbraco-ui-builder/collections/entity-identifier-converters.md --- .../collections/entity-identifier-converters.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/13/umbraco-ui-builder/collections/entity-identifier-converters.md b/13/umbraco-ui-builder/collections/entity-identifier-converters.md index b67ee21b308..dbf1ad353fe 100644 --- a/13/umbraco-ui-builder/collections/entity-identifier-converters.md +++ b/13/umbraco-ui-builder/collections/entity-identifier-converters.md @@ -33,4 +33,4 @@ An entity that references an Umbraco object would look like this: } ``` -You can also define and use your own custom type converter and UI Builder will take care of the data persistence. +You can also create a custom type converter. UI Builder will handle data persistence automatically. From e5b6a0d851d2cfbfce7ed96df87f9a73182b6514 Mon Sep 17 00:00:00 2001 From: Esha Noronha <82437098+eshanrnh@users.noreply.github.com> Date: Mon, 7 Apr 2025 10:23:48 +0200 Subject: [PATCH 09/12] Update 13/umbraco-ui-builder/collections/entity-identifier-converters.md --- .../collections/entity-identifier-converters.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/13/umbraco-ui-builder/collections/entity-identifier-converters.md b/13/umbraco-ui-builder/collections/entity-identifier-converters.md index dbf1ad353fe..657895a79f7 100644 --- a/13/umbraco-ui-builder/collections/entity-identifier-converters.md +++ b/13/umbraco-ui-builder/collections/entity-identifier-converters.md @@ -10,7 +10,7 @@ You can read more about them in the [UDI Identifiers](../../umbraco-cms/referenc If you want to use in your model a reference to an Umbraco object and retrieve the `Integer` or `Guid` value of it, you would need to apply a conversion process to the `UDI` value. -To achieve that you will need to use one of UI Builder's converters - `EntityIdentifierToIntTypeConverter` or `EntityIdentifierToGuidTypeConverter` - and add it as a `[TypeConverterAttribute]` to your model's foreign key property. +Use one of UI Builder's converters - `EntityIdentifierToIntTypeConverter` or `EntityIdentifierToGuidTypeConverter`. Add it as a `[TypeConverterAttribute]` to your model's foreign key property. An entity that references an Umbraco object would look like this: From 5438210fd694661b7bc2ddcc4e4fbec7418c2774 Mon Sep 17 00:00:00 2001 From: Esha Noronha <82437098+eshanrnh@users.noreply.github.com> Date: Mon, 7 Apr 2025 10:23:54 +0200 Subject: [PATCH 10/12] Update 13/umbraco-ui-builder/collections/entity-identifier-converters.md --- .../collections/entity-identifier-converters.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/13/umbraco-ui-builder/collections/entity-identifier-converters.md b/13/umbraco-ui-builder/collections/entity-identifier-converters.md index 657895a79f7..a1cb38c5447 100644 --- a/13/umbraco-ui-builder/collections/entity-identifier-converters.md +++ b/13/umbraco-ui-builder/collections/entity-identifier-converters.md @@ -8,7 +8,7 @@ Umbraco stores identifiers in UDI format for most Umbraco object types. You can read more about them in the [UDI Identifiers](../../umbraco-cms/reference/querying/udi-identifiers.md) section of the documentation. -If you want to use in your model a reference to an Umbraco object and retrieve the `Integer` or `Guid` value of it, you would need to apply a conversion process to the `UDI` value. +If you want to reference an Umbraco object in your model and retrieve its `Integer` or `Guid` value, you must convert the `UDI` value. Use one of UI Builder's converters - `EntityIdentifierToIntTypeConverter` or `EntityIdentifierToGuidTypeConverter`. Add it as a `[TypeConverterAttribute]` to your model's foreign key property. From 35712d814cf3f7f1c182e448fbc2820b38f27e8a Mon Sep 17 00:00:00 2001 From: Esha Noronha <82437098+eshanrnh@users.noreply.github.com> Date: Mon, 7 Apr 2025 10:24:00 +0200 Subject: [PATCH 11/12] Update 15/umbraco-ui-builder/release-notes.md --- 15/umbraco-ui-builder/release-notes.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/15/umbraco-ui-builder/release-notes.md b/15/umbraco-ui-builder/release-notes.md index fe6253a9055..dc416a01410 100644 --- a/15/umbraco-ui-builder/release-notes.md +++ b/15/umbraco-ui-builder/release-notes.md @@ -21,10 +21,10 @@ Below are the release notes for Umbraco UI Builder 15, detailing all changes in #### [**15.1.2**](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F15.1.2) **(April 4th 2025)** * Removed global registration of `UDI` converters [#144](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/144), [#136](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/136), and introduced new [Entity Identifier Converters](./collections/entity-identifier-converters.md). -* Fixed `Create` action button [#137](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/137) -* Add collection list view refresh feature following an entity action [#139](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/139) -* Fixed collection visibility [#134](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/134) -* Enable rendering of sidebar properties. +* Fixed `Create` action button [#137](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/137). +* Added collection list view refresh feature following an entity action [#139](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/139). +* Fixed collection visibility [#134](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/134). +* Enabled rendering of sidebar properties. * Fixed an issue that prevented the creation of multiple sections. #### [**15.1.1**](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F15.1.1) **(March 21st 2025)** From c15597d4cb13686b2d4a470224b3d81cdaa833f2 Mon Sep 17 00:00:00 2001 From: Esha Noronha <82437098+eshanrnh@users.noreply.github.com> Date: Mon, 7 Apr 2025 10:24:37 +0200 Subject: [PATCH 12/12] Update 13/umbraco-ui-builder/release-notes.md --- 13/umbraco-ui-builder/release-notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/13/umbraco-ui-builder/release-notes.md b/13/umbraco-ui-builder/release-notes.md index 1b18025785d..b9601525c0b 100644 --- a/13/umbraco-ui-builder/release-notes.md +++ b/13/umbraco-ui-builder/release-notes.md @@ -20,7 +20,7 @@ This section contains the release notes for Umbraco UI Builder 13 including all #### [**13.2.3**](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F13.2.3) **(April 4th 2025)** -* Removed global registration of `UDI` converters [#144](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/144) and introduced new [Entity Identifier Converters](./collections/entity-identifier-converters.md) . +* Removed global registration of `UDI` converters [#144](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues/144) and introduced new [Entity Identifier Converters](./collections/entity-identifier-converters.md). #### [**13.2.2**](https://github.com/umbraco/Umbraco.UIBuilder.Issues/issues?q=is%3Aissue+is%3Aclosed+label%3Arelease%2F13.2.2) **(March 21st 2025)**