Upgrading to v4
To upgrade to v4, simply run:- SQL
- Mongoose
In case of a regression introduced in Production after the upgrade, a rollback to your previous agent version 3 is the fastest way to restore your admin panel.
Breaking changes
New JWT authentication token
The information format of the session token have changed in v4.You could be impacted if you use the user session in Smart Action controllers or Smart Routes
req.user in v3
req.user in v4
New filters query parameters format
The query parameters sent for filtering purposes have changed in v4.You could be impacted if you have custom filter implementations.
req.params.filters:
MongoDB
This section is dedicated to breaking changes on projects using MongoDB connections.
MongoDB version support
The minimal version supported by the agent v4 is MongoDB v3.2 (December 2015). The way the agent implements the resources filtering changed and this new implementation uses features that does not exist in MongoDB versions older than 3.2.Smart Field search implementation
The Smart Field search implementation has changed:- The function signature now has only one
searchparameter. - The expected value to be returned is a hash of the conditions (instead of the
queryobject).
Condition operator changes
For consistency reasons,contains, starts with and ends with operators are now case sensitive.
Smart relationships reference syntax
If you had areference property in a Smart relationship you implemented, the syntax has changed: