Mapper ManyToMany trait fails to save added and then deleted join #1316

Tmr opened this Issue Aug 31, 2012 · 2 comments


None yet

3 participants

Tmr commented Aug 31, 2012

Code of function:

    def save = {
      _joins = joins.filter { join =>
        otherFK(join)(f => != f.defaultValue)
      _joins foreach { thisFK(_)(_ set }

      removedJoins.forall {_.delete_!} & ( // continue saving even if deleting fails
        children.forall( &&

if removedJoins contains join which returns _.delete_! == false while calling removedJoins.forall {_.delete_!} for example because of db_can_delete_? of join returns false (which is the case when we add and remove the join before save), then other removed joins in removedJoins, if they are after the join, will not be deleted. This is because forall method stops evaluating after first false

dpp commented Aug 31, 2012

Please do not open tickets until you've discussed an issue on the Lift mailing list. Please see

@dpp dpp closed this Aug 31, 2012
Tmr commented Aug 31, 2012

Sorry for my ignorance. I've opened topic in the mailing list:

@nafg nafg reopened this Sep 3, 2012
@nafg nafg was assigned Sep 3, 2012
@nafg nafg was unassigned by Tmr Apr 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment