@@ -46,7 +46,7 @@ public void Can_join_on_table_with_schemas()
46
46
{
47
47
Id = 1 ,
48
48
Child = new SchemaTable2 { Name = "Foo" }
49
- } , references : true ) ;
49
+ } , references : true ) ;
50
50
51
51
db . Save ( new SchemaTable1
52
52
{
@@ -76,13 +76,16 @@ public void Can_query_with_Schema_and_alias_attributes()
76
76
db . DropAndCreateTable < Section > ( ) ;
77
77
db . DropAndCreateTable < Page > ( ) ;
78
78
79
- db . Save ( new Page {
79
+ db . Save ( new Page
80
+ {
80
81
SectionId = 1 ,
81
82
} , references : true ) ;
82
- db . Save ( new Page {
83
+ db . Save ( new Page
84
+ {
83
85
SectionId = 2 ,
84
86
} , references : true ) ;
85
- db . Save ( new Section {
87
+ db . Save ( new Section
88
+ {
86
89
Id = 1 ,
87
90
Name = "Name1" ,
88
91
ReportId = 15 ,
@@ -114,12 +117,20 @@ public void Does_complex_query_using_Schemas_with_LeftJoins()
114
117
db . DropAndCreateTable < Page > ( ) ;
115
118
db . DropAndCreateTable < Section > ( ) ;
116
119
120
+ db . Insert ( new Editable { Index = 1 , Content = "Content" , PageId = 1 , Styles = "Styles" , TypeId = 1 } ) ;
121
+ db . Insert ( new EditableRevision { Content = "Content" , Styles = "Styles" , Date = DateTime . UtcNow , EditableId = 1 , EmployeeId = 1 , Reason = "Reason" } ) ;
122
+ db . Insert ( new LogEntry { Date = DateTime . UtcNow , KlasId = 1 , PageId = 1 , PageTrackerId = 1 , ReportId = 1 , RequestUrl = "http://url.com" , TypeId = 1 } ) ;
123
+ db . Insert ( new Report { DefaultAccessLevel = 1 , Description = "Description" , Name = "Name" } ) ;
124
+ db . Insert ( new Page { AccessLevel = 1 , AssignedEmployeeId = 1 , Index = 1 , SectionId = 1 , Template = "Template" } ) ;
125
+ db . Insert ( new Section { Name = "Name" , ReportId = 1 } ) ;
126
+
117
127
var q = db . From < Section > ( )
118
128
. Join < Section , Page > ( ( s , p ) => s . Id == p . SectionId )
119
129
. Join < Page , Editable > ( ( p , e ) => p . Id == e . PageId )
120
- . Where < Section , Page > ( ( s , p ) => s . ReportId == 15 && p . Index == 24 ) ;
130
+ . Where < Section , Page > ( ( s , p ) => s . ReportId == 1 && p . Index == 1 ) ;
121
131
122
132
var result = db . Select < Editable > ( q ) ;
133
+ result . PrintDump ( ) ;
123
134
124
135
db . GetLastSql ( ) . Print ( ) ;
125
136
}
0 commit comments