[Ignore] atbt discerning Insert/Update
https://github.com/sqlkata/querybuilder/issues/721 Related issue
Nice feature!, I suggested to reuse the existing Ignore attribute, and please add test to cover this change
@ahmad-moussawi also about considerKeys, on Update/Insert, i was thinking that when is true it should be able to put the Where despite this attb being [Ignore], in my case we are using [Key, Ignore] for Ids, bcos they auto generate in db but for keys we want to insert we just avoid the [Ignore], but i need to put myself for the update.Where(keys, keys.value) more than 1 where if needed for complex keys, but if we would leave this outside can be usefull. What d u think.
Instead of
if (property.GetCustomAttribute(typeof(IgnoreAttribute)) != null) { continue; }
First and then
if (considerKeys && colAttr != null) { if ((colAttr as KeyAttribute) != null) { this.Where(name, value); } }
Put the consider keys + Where first and then the continue
@ahmad-moussawi changes aplied + UT to check the ignore on diferent cases.