File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed
Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -460,7 +460,7 @@ export abstract class InMemoryDocumentSessionOperations
460460 hasAll = hasAll && this . isLoaded ( includeId ) ;
461461 } ) ;
462462
463- if ( ! hasAll [ 0 ] ) {
463+ if ( ! hasAll ) {
464464 return false ;
465465 }
466466 }
Original file line number Diff line number Diff line change 1+ import { IDocumentStore } from "../../../src" ;
2+ import { disposeTestDocumentStore , testContext } from "../../Utils/TestUtil" ;
3+ import { User } from "../../Assets/Entities" ;
4+ import { assertThat } from "../../Utils/AssertExtensions" ;
5+
6+ describe ( "RDBC_440" , function ( ) {
7+
8+ let store : IDocumentStore ;
9+
10+ beforeEach ( async function ( ) {
11+ store = await testContext . getDocumentStore ( ) ;
12+ } ) ;
13+
14+ afterEach ( async ( ) =>
15+ await disposeTestDocumentStore ( store ) ) ;
16+
17+ it ( "can load just added entity" , async ( ) => {
18+ const session = store . openSession ( ) ;
19+ const user1 = Object . assign ( new User ( ) , {
20+ name : "Marcin" ,
21+ id : "users/1"
22+ } ) ;
23+
24+ await session . store ( user1 ) ;
25+ const loadedUser = await session
26+ . include ( "addressId" )
27+ . load ( "users/1" )
28+
29+ assertThat ( loadedUser )
30+ . isSameAs ( user1 ) ;
31+ } ) ;
32+ } ) ;
You can’t perform that action at this time.
0 commit comments