Relations in 4.0.0-beta3

Hi there!
I’m trying to migrate from 3 to 4.0 beta and I’m having difficulty with object relations.
Look this sample code:

try {
    Session session = new Session();
    if (_publication.getSessions() == null) {
        _publication.setSessions(new ArrayList<>());
    _publication = Backendless.Persistence.of(Publication.class).save( _publication );
} catch (Exception e) {

In Backendless 3, this code works very well: when I save the object _publication Backendless creates or updates all Session objects contained in _publication.getSessions().
In Backendless 4, the sessions are not saved and Backendless return _publication with sessions field null.
What I suppose to do in Backendless 4?
Thank you a lot.

Hi Alexandre,
Establishing and deleting relationships in Backendless 4 works differently than in 3.x. Please see the documentation for details:

I see. I just made the changes and it’s working now. Personally, I think that the old method is more convenient, but ok. Thank you for the help! =)