Mjoin Having Error on editor 1.6.1

Mjoin Having Error on editor 1.6.1

edanyildizedanyildiz Posts: 43Questions: 13Answers: 4

After upgrading to 1.6.1 i am having error using Mjoin
As far as i understand from the error, the problem is about the sql constraint, but there are no rows in the joined table. Before upgrade, it was working perfectly; i was able to delete the parent.

This is the server response;

Notice: Undefined property: DataTables\Editor\MJoin::$_join in /var/www/vhosts/movea.com.tr/subdomains/crm/httpdocs/plugins/Editor-PHP-1.6.1/php/Editor/Join.php on line 692

Notice: Undefined variable: ids in /var/www/vhosts/movea.com.tr/subdomains/crm/httpdocs/plugins/Editor-PHP-1.6.1/php/Editor/Join.php on line 692
{"fieldErrors":[],"error":"SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (moveacrm\/offerdetails, CONSTRAINT offerdetails_ibfk_1 FOREIGN KEY (offer) REFERENCES offers (id))","data":[],"ipOpts":[],"cancelled":[]}

here is the code;

$editor->join(
    Mjoin::inst( 'offers' )
        ->link( 'offers.project', 'projects.id' )
        ->order( 'offers.created asc' )
        ->fields(
            Field::inst( 'id' )

            )
        );

This question has an accepted answers - jump to answer

Answers

This discussion has been closed.