Actually, that’s not a good example. If your records are based on good OO principles they have their own identity, which is independent from a database record id. Returning the id this is useless and thus no reason to break CQS.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store