7 – The creation of a new node entity during the saving of another node entity causes the SQL exception at some point

We have a type of Donation Registration Content and a type of Donor content for a drupal administration application of the Blood Bank. A donor can have any donation record number.

The system does not explicitly require the creation of a donor record before creating a donation record. Create a donor record during the donation pre-registration period if the donor reference is not provided in the URL. The system obtains the reference of the donor created during the saving and updates it in the donation record. Therefore, we now have a donor with a donation record while the user keeps a donation record.

The problem is that the new donor record is not created all the time. We get the SQL exception: SQLSTATE[42000]: Syntax error or access violation: 1305 SAVEPOINT savepoint_1 does not exist.

Is there any other way to create the donor so that this problem does not occur or am I doing something wrong?

Trail:
0 /srv/www/www.example.com/public_html/includes/database/database.inc(2227): PDOStatement-> execute (Array)
1 / srv / www / www.example.com / public_html / includes / database / database.inc (697): DatabaseStatementBase-> execute (Array, Array)
2 / srv / www / www.example.com / public_html / includes / database / database.inc (1081): DatabaseConnection-> query (& # 39; ROLLBACK TO SAV … & # 39;)
3 / srv / www / www.example.com / public_html / includes / database / database.inc (1989): DatabaseConnection-> rollback (& ​​# 39; savepoint_1 & # 39;)
4 /srv/www/www.example.com/public_html/modules/node/node.module(1197): DatabaseTransaction-> rollback ()
5 / srv / www / www.example.com / public_html / sites / all / modules / entity / entity.module (290): node_save (Object (stdClass))
6 / srv / www / www.example.com / public_html / sites / all / modules / entity / includes / enti … (885): entity_save (& # 39; node & # 39 ;, Object (stdClass))
7 /srv/www/www.example.com/public_html/sites/all/modules/custom/ji_custom/Ent…(114): EntityDrupalWrapper-> save ()
8 / srv / www / www.example.com / public_html / sites / all / modules / custom / ji_custom / Ent … (226): DonorEntity :: createNewDonorFromDonationRecord (Object (EntityDrupalWrapper))