Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mulder999 opened this issue Oct 31, 2024 · 0 comments
Open

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

mulder999 opened this issue Oct 31, 2024 · 0 comments
Labels
enhancement new feature or request up for grabs feature requires community contribution

Comments

@mulder999
Copy link

mulder999 commented Oct 31, 2024

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()

@dj-nitehawk dj-nitehawk added the up for grabs feature requires community contribution label Oct 31, 2024
@dj-nitehawk dj-nitehawk added the enhancement new feature or request label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new feature or request up for grabs feature requires community contribution
Projects
None yet
Development

No branches or pull requests

2 participants