Added test for rollback making belongsTo and hasMany relations null

Added a failing test for Issue #1824