Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions 13/umbraco-ui-builder/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
36 changes: 36 additions & 0 deletions 13/umbraco-ui-builder/collections/entity-identifier-converters.md
Original file line number Diff line number Diff line change
@@ -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.

Check warning on line 11 in 13/umbraco-ui-builder/collections/entity-identifier-converters.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [UmbracoDocs.SentenceLength] Write shorter sentences (less than 25 words). Raw Output: {"message": "[UmbracoDocs.SentenceLength] Write shorter sentences (less than 25 words).", "location": {"path": "13/umbraco-ui-builder/collections/entity-identifier-converters.md", "range": {"start": {"line": 11, "column": 1}}}, "severity": "WARNING"}

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.

Check warning on line 13 in 13/umbraco-ui-builder/collections/entity-identifier-converters.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [UmbracoDocs.SentenceLength] Write shorter sentences (less than 25 words). Raw Output: {"message": "[UmbracoDocs.SentenceLength] Write shorter sentences (less than 25 words).", "location": {"path": "13/umbraco-ui-builder/collections/entity-identifier-converters.md", "range": {"start": {"line": 13, "column": 1}}}, "severity": "WARNING"}

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.
4 changes: 4 additions & 0 deletions 13/umbraco-ui-builder/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions 15/umbraco-ui-builder/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
36 changes: 36 additions & 0 deletions 15/umbraco-ui-builder/collections/entity-identifier-converters.md
Original file line number Diff line number Diff line change
@@ -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.

Check warning on line 11 in 15/umbraco-ui-builder/collections/entity-identifier-converters.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [UmbracoDocs.SentenceLength] Write shorter sentences (less than 25 words). Raw Output: {"message": "[UmbracoDocs.SentenceLength] Write shorter sentences (less than 25 words).", "location": {"path": "15/umbraco-ui-builder/collections/entity-identifier-converters.md", "range": {"start": {"line": 11, "column": 1}}}, "severity": "WARNING"}

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.

Check warning on line 13 in 15/umbraco-ui-builder/collections/entity-identifier-converters.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [UmbracoDocs.SentenceLength] Write shorter sentences (less than 25 words). Raw Output: {"message": "[UmbracoDocs.SentenceLength] Write shorter sentences (less than 25 words).", "location": {"path": "15/umbraco-ui-builder/collections/entity-identifier-converters.md", "range": {"start": {"line": 13, "column": 1}}}, "severity": "WARNING"}

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.
9 changes: 9 additions & 0 deletions 15/umbraco-ui-builder/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading