Re: ObjectSelect to select uncommitted objects

2020-11-17 Thread Andrus Adamchik
FWIW, there were requests for this functionality previously, but it was hard to achieve full feature parity between in-memory and DB evaluation, so we didn't do it yet. Perhaps we should do it incrementally over time, addressing various edge cases as we uncover them. Andrus > On Nov 16, 2020,

Re: ObjectSelect to select uncommitted objects

2020-11-16 Thread giulio.ces...@gmail.com
Thanks!! I need to look carefully into this code, but it looks very promising. Cheers, Giulio Cesare On Mon, Nov 16, 2020 at 7:53 PM John Huss wrote: > There isn't anything built-in. I use this method in my own DataContext > subclass to do it. Use at your own risk, etc. > > *public* List >

Re: ObjectSelect to select uncommitted objects

2020-11-16 Thread John Huss
There isn't anything built-in. I use this method in my own DataContext subclass to do it. Use at your own risk, etc. *public* List selectIncludingPendingChanges(ObjectSelect query) { Set newAndModified = *new* HashSet<>(newObjects()); newAndModified.addAll(modifiedObjects()); Set inMemoryResul

ObjectSelect to select uncommitted objects

2020-11-14 Thread giulio.ces...@gmail.com
Hello, I have multiple places where I have to search data either on the current ObjectStore (newly inserted or modified objects) or directly in the DB. At the moment I have two distinct blocks of code, one expressed as a Predicate (used inside a stream filter) and the other with an ObjectSelect (