Skip to content

Improvement: Allow Join with DB.UpdateAndGet() #233

@mulder999

Description

@mulder999

I would like to atomically set a business lock on a child entity if its parent matches a given condition.

This would likely requires the use of Join operator which is unfortunately not available with DB.UpdateAndGet().

Basically, I desire to achieve something like the pseudo code below:

var child = DB.UpdateAndGet<Person>()
  .Match(x => x.Parent.Age < 30) // Not working with Reference
  .Modify(x => x.IsLocked, true);

public class Person
{
  public bool IsLocked { get; set; }
  public int Age { get; set; }
  public One<Person> Parent { get; set; }
}

REM: Sort is also lacking from UpdateAndGet()

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementnew feature or requestup for grabsfeature requires community contribution

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions