Implement sorting of product

* Uses updated SQL pagination
* Adds sequence to the intersection entity
* Added tests for postgres

Warning: Does not work due to SQLite issues and unknown error