The associated objects are probably (only) autocommited, which means they'll be deleted when the session is killed or the user logs out. As long as the session is active, the changes seem to be made, but when the session ends autocommitted stuff is reverted. You should see this in the log.
Mendix claims autocommits prevent data inconsistencies, while many experience quite the opposite, which is why this idea has existed since the dawn of time.
Anyway, when creating objects make sure you explicitly commit them and don't rely on autocommits.