|
@@ -389,14 +389,21 @@ namespace InABox.Core
|
|
|
{
|
|
|
if (!Contains(column))
|
|
|
{
|
|
|
- var property = DatabaseSchema.Property(typeof(T), column);
|
|
|
- if(property is null)
|
|
|
+ if(CoreUtils.TryGetProperty(typeof(T), column, out var propertyInfo))
|
|
|
{
|
|
|
- Logger.Send(LogType.Error, "", $"Property {column} does not exist on {typeof(T).Name}");
|
|
|
+ columns.Add(new Column<T>(column));
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- columns.Add(new Column<T>(property));
|
|
|
+ var property = DatabaseSchema.Property(typeof(T), column);
|
|
|
+ if(property is null)
|
|
|
+ {
|
|
|
+ Logger.Send(LogType.Error, "", $"Property {column} does not exist on {typeof(T).Name}");
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ columns.Add(new Column<T>(property));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return this;
|