You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What my team loves about JADNC is that resource properties require explicit annotation to expose them (opt-in). This guards against someone adding a new entity property that gets exposed unintentionally, requiring a breaking change to fix that.
But the capabilities on such annotated properties are opt-out. Adding [Attr] without arguments makes them mutable, filterable and sortable. We'd like to require explicitly stating that as well, to prevent users searching on columns that are not indexed in the database, resulting in a full table scan that kills performance on large tables.
If changing the defaults for parameterless AttrAttribute is too much of a breaking change, we can add a fallback setting to IJonApiOptions that controls the parameterless behavior. For example:
Discussed my proposal offline with @maurei. We concluded this is a good idea, but need to include the fallback setting in options to preserve backwards compatibility.
What my team loves about JADNC is that resource properties require explicit annotation to expose them (opt-in). This guards against someone adding a new entity property that gets exposed unintentionally, requiring a breaking change to fix that.
But the capabilities on such annotated properties are opt-out. Adding
[Attr]
without arguments makes them mutable, filterable and sortable. We'd like to require explicitly stating that as well, to prevent users searching on columns that are not indexed in the database, resulting in a full table scan that kills performance on large tables.If changing the defaults for parameterless
AttrAttribute
is too much of a breaking change, we can add a fallback setting toIJonApiOptions
that controls the parameterless behavior. For example:Where
AttributeCapabilities
is defined as:And then we can replace the existing constructor overload that takes multiple booleans with one that accepts these flags. For example:
Which would improve code readability over a line like:
The text was updated successfully, but these errors were encountered: