diff --git a/Database-Attribute_System/ClassAction.cs b/Database-Attribute_System/ClassAction.cs index 353b84a..206c3f0 100644 --- a/Database-Attribute_System/ClassAction.cs +++ b/Database-Attribute_System/ClassAction.cs @@ -43,7 +43,6 @@ namespace eu.railduction.netcore.dll.Database_Attribute_System /// /// Given object (marked with Db-attributes) /// The data - /// This checks if any class-field and data-attribute does not exists in either (Slower) public static void FillObject(T classObject, Dictionary data) { Type classType = classObject.GetType(); @@ -56,7 +55,15 @@ namespace eu.railduction.netcore.dll.Database_Attribute_System { // Interate through class-fields foreach (BaseAttribute baseAttribute in dbObject.baseAttributes) - { + { + // Remove any leading dots and table-specifiers + string dbAttName = data_keySet.Key; + if (dbAttName.Contains(".")) + { + string[] dbAttNameSplit = dbAttName.Split('.'); // Split at the '.' + dbAttName = dbAttNameSplit[dbAttNameSplit.Length - 1]; // Copy the ending text + } + // If its a match, set the value if (baseAttribute._attributeName.ToLower() == data_keySet.Key.ToLower()) { diff --git a/Database-Attribute_System/Database-Attribute_System.csproj b/Database-Attribute_System/Database-Attribute_System.csproj index 4ca33ea..c1086ff 100644 --- a/Database-Attribute_System/Database-Attribute_System.csproj +++ b/Database-Attribute_System/Database-Attribute_System.csproj @@ -4,7 +4,7 @@ netcoreapp2.1 eu.railduction.netcore.dll.Database_Attribute_System false - 1.5.12 + 1.5.13