Fixed the incorrect generation of SQL code of check constraint
associated to many-to-many relationshps. (issue #356)
Merge branch 'fix-bug-356' into develop