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])
?
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])
?
And if that is really gone, how should I save or query multiple models at the same time?
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?
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.
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.
Skuid… what’s the story here?
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).
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?
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:
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?
(Also, great to be chatting with you again too! I hope you are doing well.)
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.