Skip to content

Commit 73876ca

Browse files
authored
Merge pull request #6652 from umbraco/15/syncing
15/syncing
2 parents 1004c62 + 799445a commit 73876ca

File tree

9 files changed

+82
-6
lines changed

9 files changed

+82
-6
lines changed

14/umbraco-ui-builder/advanced/repositories.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@ public class PersonRepository : Repository<Person, int> {
4545
protected override long GetCountImpl(Expression<Func<Person, bool>> whereClause) {
4646
...
4747
}
48+
49+
protected override IEnumerable<TJunctionEntity> GetRelationsByParentIdImpl<TJunctionEntity>(int parentId, string relationAlias)
50+
{
51+
...
52+
}
53+
54+
protected override TJunctionEntity SaveRelationImpl<TJunctionEntity>(TJunctionEntity entity)
55+
{
56+
...
57+
}
4858
}
4959
````
5060

14/umbraco-ui-builder/collections/related-collections.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ public class StudentCourse
7272
## Defining a related collection
7373

7474
You can get started with related collection through a two step process:
75+
7576
1. Add collection definition
7677
2. Add related collection entity picker and definition
7778

@@ -118,3 +119,48 @@ collectionConfig.Editor(editorConfig =>
118119
{% hint style="info" %}
119120
**Relation Config Alias:** The relation config alias must correspond to the related collection picker field alias! (e.g. `studentsCourses`)
120121
{% endhint %}
122+
123+
## Defining repository methods
124+
125+
### **IEnumerable<StudentCourse> GetRelationsByParentIdImpl<StudentCourse>(int parentId, string relationAlias)**
126+
127+
Retrieves the related collections based on the ID of the parent entity.
128+
129+
```csharp
130+
{
131+
var db = _scopeProvider.CreateScope().Database;
132+
var sql = db.SqlContext.Sql()
133+
.Select(new[] { "StudentId", "CourseId" } )
134+
.From("StudentsCourses")
135+
.Where($"studentId = @0", parentId);
136+
137+
var result = db.Fetch<StudentCourse>(sql);
138+
139+
return result;
140+
}
141+
```
142+
143+
### **StudentCourse SaveRelationImpl<StudentCourse>(StudentCourse entity)**
144+
145+
Adds a new related collection to the current parent entity.
146+
147+
```csharp
148+
{
149+
var db = _scopeProvider.CreateScope().Database;
150+
151+
var type = entity.GetType();
152+
var studentId = type.GetProperty("StudentId").GetValue(entity);
153+
var courseId = type.GetProperty("CourseId").GetValue(entity);
154+
155+
// delete relation if exists
156+
db.Execute("DELETE FROM StudentsCourses WHERE StudentId = @0 AND CourseId = @1",
157+
studentId,
158+
courseId);
159+
160+
db.Execute("INSERT INTO StudentsCourses (StudentId, CourseId) VALUES (@0, @1)",
161+
studentId,
162+
courseId);
163+
164+
return entity;
165+
}
166+
```

15/umbraco-cms/SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
* [Using Umbraco services](reference/management/using-services/README.md)
110110
* [Content Type Service](reference/management/using-services/contenttypeservice.md)
111111
* [Management API](reference/management-api/README.md)
112-
* [External Access](reference/management-api/external-access.md)
112+
* [External Access](reference/management-api/external-access.md)
113113
* [Cache & Distributed Cache](reference/cache/README.md)
114114
* [Cache Seeding](reference/cache/cache-seeding.md)
115115
* [Examples](reference/cache/examples/README.md)

15/umbraco-cms/fundamentals/setup/server-setup/azure-web-apps.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ You need to add these configuration values. E.g in a json configuration source l
3333
}
3434
}
3535
```
36+
3637
You can also copy the following JSON directly into your Azure Web App configuration via the Advanced Edit feature.
38+
3739
![image](https://github.com/umbraco/UmbracoDocs/assets/11179749/ae53a26b-c45a-4b71-932a-0682f3d264a8)
3840

3941
```json
@@ -54,6 +56,8 @@ You can also copy the following JSON directly into your Azure Web App configurat
5456
}
5557
```
5658

59+
Remember to add an `ASPNETCORE_ENVIRONMENT` variable with values `Development`, `Staging`, or `Production`.
60+
5761
The minimum recommended Azure SQL Tier is "S2", however noticeable performance improvements are seen in higher Tiers
5862

5963
If you are load balancing or require the scaling ("scale out") ability of Azure Web Apps then you need to consult the [Load Balancing documentation](load-balancing/). This is due to the fact that a lot more needs to be configured to support scaling/auto-scaling.

15/umbraco-cms/release-candidate-guide.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ Here is a list of all the articles that are new to this version or have been upd
6767
* [Creating a Custom Seed Key Provider](extending/creating-custom-seed-key-provider.md)
6868
* [Cache Settings](reference/configuration/cache-settings.md)
6969
* [Cache Seeding](reference/cache/cache-seeding.md)
70+
* [API Users](fundamentals/data/users/api-users.md)
71+
* [External Access](reference/management-api/external-access.md)
72+
73+
* New UI for the Rich Text Editor: Tiptap
74+
* [Rich Text Editor](fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/rich-text-editor/README.md)
75+
* [Configuration](fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/rich-text-editor/configuration.md)
76+
* [Blocks](fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/rich-text-editor/blocks.md)
77+
* [Change Rich Text Editor UI](fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/rich-text-editor/change-rich-text-editor-ui.md)
7078

7179
### Updated articles
7280

15/umbraco-commerce/getting-started/the-licensing-model.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ Once you have received your license code it needs to be installed on your site.
6262
```json
6363
"Umbraco": {
6464
"Licenses": {
65-
"Umbraco.Commerce": "YOUR_LICENSE_KEY"
65+
"Products": {
66+
"Umbraco.Commerce": "YOUR_LICENSE_KEY"
67+
}
6668
}
6769
}
6870
```

15/umbraco-commerce/key-concepts/webhooks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Webhook configuration in Umbraco Commerce.
44

55
# Webhooks
66

7-
Umbraco Commerce makes use of the webhooks feature added in Umbraco v13. See the [Webooks documentation](/umbraco-cms/reference/webhooks) for general webooks configuration.
7+
Umbraco Commerce makes use of the webhooks feature added in Umbraco v13. See the [Webhooks documentation](https://docs.umbraco.com/umbraco-cms/reference/webhooks) for general webooks configuration.
88

99
# Events
1010

15/umbraco-deploy/installation/the-licensing-model.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ For example, in `appsettings.json`:
6060
...
6161
},
6262
"Licenses": {
63-
"Umbraco.Deploy.OnPrem": "<your license key>"
63+
"Products": {
64+
"Umbraco.Deploy.OnPrem": "<your license key>"
65+
}
6466
},
6567
"Deploy": {
6668
...
@@ -120,7 +122,9 @@ Then configure a random string as an authorization key in configuration. This is
120122
```json
121123
"Umbraco": {
122124
"Licenses": {
123-
"Umbraco.Deploy.OnPrem": "<your license key>"
125+
"Products": {
126+
"Umbraco.Deploy.OnPrem": "<your license key>"
127+
}
124128
},
125129
"LicensesOptions": {
126130
"EnableScheduledValidation": false,

15/umbraco-workflow/installation/licensing.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ Once you have received your license code it needs to be installed on your site.
1717
```json
1818
"Umbraco": {
1919
"Licenses": {
20-
"Umbraco.Workflow": "YOUR_LICENSE_KEY"
20+
"Products": {
21+
"Umbraco.Workflow": "YOUR_LICENSE_KEY"
22+
}
2123
}
2224
}
2325
```

0 commit comments

Comments
 (0)