Open sloncho opened 10 years ago
I have the same problem. Seems development has stalled so I might have a crack at fixing this myself.
I had a look at this today. The join implementation has multiple problems and it's not easy to implement something that would work with any level of joins. I found an obvious bug that seems like a cut-and-paste bug where the relationships weren't set up properly. But the main problem is how relationships are handled and stored.
With your setup the stored object would be SettingsGroup.SettingsDescrption.SettingsValue. In SQL the result is always flat, the name of each column is TableName.Column. The InMemoryAdapter instead returns a list of dictionary that contain joined objects in a property. The result can have any depth. And in a one to many relationship you only get one row instead of row*relations. InMemoryAdapter should perhaps return a dictionary with all the relation properties (prefixed with table name) included in that one dict?
@bjornsallarp is the join logic broken in any of the other adapters?
Looks like the InMemoryAdapter fails to follow 2 level joins. In the following code,
value.Group
isnull
, whiledescription.Group
(one level join) andvalue.Description
(also one level join) have the right values.The same query against a real database with foreign keys works as expected.