Correct orders model for postgresql