diff --git a/Kyoo.Common/Models/Resources/Episode.cs b/Kyoo.Common/Models/Resources/Episode.cs
index aa947836..594763be 100644
--- a/Kyoo.Common/Models/Resources/Episode.cs
+++ b/Kyoo.Common/Models/Resources/Episode.cs
@@ -60,7 +60,7 @@ namespace Kyoo.Models
[SerializeIgnore] public string ShowSlug { private get; set; }
///
- /// The ID of the Show containing this episode. This value is only set when the has been loaded.
+ /// The ID of the Show containing this episode.
///
[SerializeIgnore] public int ShowID { get; set; }
///
@@ -69,7 +69,7 @@ namespace Kyoo.Models
[LoadableRelation(nameof(ShowID))] public Show Show { get; set; }
///
- /// The ID of the Season containing this episode. This value is only set when the has been loaded.
+ /// The ID of the Season containing this episode.
///
[SerializeIgnore] public int? SeasonID { get; set; }
///
diff --git a/Kyoo.Common/Models/Resources/Season.cs b/Kyoo.Common/Models/Resources/Season.cs
index 07411cf3..9b292020 100644
--- a/Kyoo.Common/Models/Resources/Season.cs
+++ b/Kyoo.Common/Models/Resources/Season.cs
@@ -41,7 +41,7 @@ namespace Kyoo.Models
[SerializeIgnore] public string ShowSlug { private get; set; }
///
- /// The ID of the Show containing this season. This value is only set when the has been loaded.
+ /// The ID of the Show containing this season.
///
[SerializeIgnore] public int ShowID { get; set; }
///
diff --git a/Kyoo.Common/Models/Resources/Show.cs b/Kyoo.Common/Models/Resources/Show.cs
index 5232dee2..ffb2ae49 100644
--- a/Kyoo.Common/Models/Resources/Show.cs
+++ b/Kyoo.Common/Models/Resources/Show.cs
@@ -94,7 +94,7 @@ namespace Kyoo.Models
[EditableRelation] [LoadableRelation] public ICollection> ExternalIDs { get; set; }
///
- /// The ID of the Studio that made this show. This value is only set when the has been loaded.
+ /// The ID of the Studio that made this show.
///
[SerializeIgnore] public int? StudioID { get; set; }
///
diff --git a/Kyoo.Common/Models/Resources/Track.cs b/Kyoo.Common/Models/Resources/Track.cs
index 38006392..00ae745c 100644
--- a/Kyoo.Common/Models/Resources/Track.cs
+++ b/Kyoo.Common/Models/Resources/Track.cs
@@ -119,7 +119,7 @@ namespace Kyoo.Models
[SerializeIgnore] public StreamType Type { get; set; }
///
- /// The ID of the episode that uses this track. This value is only set when the has been loaded.
+ /// The ID of the episode that uses this track.
///
[SerializeIgnore] public int EpisodeID { get; set; }
///
diff --git a/Kyoo.Common/Utility/Merger.cs b/Kyoo.Common/Utility/Merger.cs
index 417ea944..55cc17e3 100644
--- a/Kyoo.Common/Utility/Merger.cs
+++ b/Kyoo.Common/Utility/Merger.cs
@@ -163,13 +163,9 @@ namespace Kyoo
Type type = typeof(T);
foreach (PropertyInfo property in type.GetProperties())
{
- if (!property.CanWrite)
+ if (!property.CanWrite || property.GetCustomAttribute() != null)
continue;
-
- object defaultValue = property.PropertyType.IsValueType
- ? Activator.CreateInstance(property.PropertyType)
- : null;
- property.SetValue(obj, defaultValue);
+ property.SetValue(obj, property.PropertyType.GetClrDefault());
}
return obj;
diff --git a/Kyoo.CommonAPI/DatabaseContext.cs b/Kyoo.CommonAPI/DatabaseContext.cs
index a2b7eeb2..afca55b5 100644
--- a/Kyoo.CommonAPI/DatabaseContext.cs
+++ b/Kyoo.CommonAPI/DatabaseContext.cs
@@ -132,14 +132,6 @@ namespace Kyoo
{
base.OnModelCreating(modelBuilder);
- modelBuilder.Entity