Skip to main content
Nintex Community Menu Bar
Question

skuid.model.save depreciation

  • July 11, 2024
  • 10 replies
  • 1 view
  • Translate

Forum|alt.badge.img+18

I noticed that skuid.model.save() along with several other functions on skuid.model were depreciated as of Brooklyn.

What does that mean for any of my code that uses soemthing like this:

skuid.model.save([Model1, Model2, Model3])

?

Did this topic help you find an answer to your question?
This topic has been closed for comments

10 replies

Forum|alt.badge.img+18
  • Author
  • 2192 replies
  • July 11, 2024

And if that is really gone,  how should I save or query multiple models at the same time?

Translate

Forum|alt.badge.img+9
  • Nintex Employee
  • 889 replies
  • July 11, 2024

Hi Matt, it looks like the alternative is skuid.model.Model.save, which I believe handles one model. So, perhaps you can set up the models-to-save in an array, then use a for loop to call this new method on the array?

Translate

Forum|alt.badge.img+9

Where is this identified as deprecated in Brooklyn? Isn’t it still in Millau? https://docs.skuid.com/latest/en/skuid/api/skuid_model.html (11.0.2) still documents it and says nothing about deprecation. Or maybe I missed something on a cursory glance.

Translate

Forum|alt.badge.img+4

What does deprecated mean? We are using this API and we recently upgrade to Brooklyn (10.0.12) and we are not having issues using this API.

Translate

Forum|alt.badge.img+18
  • Author
  • 2192 replies
  • July 11, 2024

Skuid… what’s the story here?

Translate

Forum|alt.badge.img+6
  • Nintex Employee
  • 401 replies
  • July 11, 2024

That API actually functions the same as skuid.model.save and takes an Array of models, so it can be a one to one swap. There is no need to loop and call that API multiple times (we actually recommend not doing that).

Translate

Forum|alt.badge.img+18
  • Author
  • 2192 replies
  • July 11, 2024

Thanks, J.

(good to hear from you again!)

Just to clarify, I can do a simple find-and-replace from skuid.model.save to skuid.model.Model.save?

Translate

Forum|alt.badge.img+6
  • Nintex Employee
  • 401 replies
  • July 11, 2024

Hi, folks. First, thanks for bringing this to our attention. Our Deprecated APIs page could use a clarifying statement, and it looks like we did miss adding a note about the deprecation status to at least some of our deprecated APIs (thanks, Mike Dwyer). I’ll pass this along to our documentation team, and we’ll get that sorted. Now, as for the original question: what to do about deprecated APIs in existing code.

When we say “deprecated” here at Skuid, we mean:

  1. We discourage the use of the particular API
  2. The API is officially unsupported
  3. The API may be removed in a future version of Skuid
Deprecation notices are meant to be a heads up that this API isn’t officially sanctioned by Skuid anymore, and we recommend you migrate away from using it in your code. To aid in this, we’ve provided alternatives for everything on that list. We don’t take breaking changes lightly, so we hold them for Major versions (e.g. 12.0.0) and call them out in our release notes. Don’t expect these to disappear or stop working in a Maintenance Release (e.g. 11.0.4).

Translate

Forum|alt.badge.img+6
  • Nintex Employee
  • 401 replies
  • July 11, 2024

That will probably work, but we’ve all been burned by “Oh, I’ll just find and replace that” before, am I right? If you’ve got multiple instances of skuid.model.save in a single file, you could also consider declaring a var at the top and replacing throughout with that, such as…

 (function(skuid){ var saveModel = skuid.model.Model.save, ... saveModel([Model1, Model2, Model3]); ... })(skuid);

Make sense?

Translate

Forum|alt.badge.img+6
  • Nintex Employee
  • 401 replies
  • July 11, 2024

(Also, great to be chatting with you again too! I hope you are doing well.)

Translate

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings