This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I'm getting an error with this SQL generated. I have two tables, FluidType and FluidCategory, both in schema Lookup, linked by a plain many-to-many relationship. All three entities are cached. The query fails because the schema is not prepended to FluidType... On a side note, the FluidTypeId field in the join table is Not Null, so should it be doing a Left join? I suppose it doesn't make much difference if it still works :) SQL: exec sp_executesql N'SELECT [FluidCategoryFluidType].[Id] AS [FluidCategoryFluidType.Id], [FluidCategoryFluidType].[FluidCategoryId] AS [FluidCategoryFluidType.FluidCategoryId], [FluidCategoryFluidType].[FluidTypeId] AS [FluidCategoryFluidType.FluidTypeId] FROM [Lookup].[FluidCategoryFluidType] LEFT OUTER JOIN [FluidType] ON [FluidCategoryFluidType].[FluidTypeId] = [FluidType].[Id] WHERE [FluidCategoryFluidType].[FluidCategoryId] = @p0 ORDER BY [FluidType].[Description]',N'@p0 int',@p0=2 |
|
|
I'm having a bit of trouble reproducing this, I think because I'm not quite sure what the originating query is. Could you check that the problem still occurs with the latest nightly build, and if so could you post a minimal repro project (just the three entities involved, and a console application or NUnit test that executes the problem query or code)? Thanks! |
|
|
Are you using an auto-generated ThroughEntity for your many to many relationship? If so, you will want to switch to an explicit ThroughEntity which is defined on your model and you can then set the Schema property. Auto Generated ThroughEntities are generated without a schema which will cause a mismatch if you have this set in the database. If this is not the case would you be able to send through a small repro of this behavior and we can have a look at what is occurring here.
|
|
|
Here's a test case. Thanks for taking a look! |
|
|
Thanks for the concise repro! There was indeed a bug behind this and we have added in a fix for this which will be available in the next nightly build for you.
|
|
|
Great, thanks! |
|