Verify non-optional OnetoOne and ManyToOne relationships.

Added tests to verify that @OneToOne and @ManyToOne relationships marked as optional=false result in valid scaffolds where entities can be persisted.