![]() was excluded from migration using modelBuilder.Entity().ToTable(nameof(FuzzyMetaMovie), t => t.ExcludeFromMigrations()) in the DBContent class.includes the foreign table of its parent.I found a solution that meets all my requirements: Looping through all the results after calling ToList or else and filling by hand the property Titles. INNER JOIN MetaTitles AS mt ON mt.MetaMovieId = fuzzyTitles.MetaMovieId to my raw query. I tried to use Include with casting to MetaMovie, but it gives me an exception. I tried to use Include, but it gives me an exception. (SELECT DISTINCT word, distance FROM MetaTitlesFuzzy WHERE word MATCH '" + title.Replace("'", "''") + AND distance < 500) AS fuzzyWords SELECT mt.MetaMovieId, MIN(fuzzyWords.distance) AS Distance FROM MetaTitles AS mt, Problemĭb.MetaMovies.First() gives me the first entry and the property Titles is filled.ĭb.FuzzyMetaMovies.FromSqlRaw(fuzzyQuery).First() gives me the first entry, but the property Titlesis NOT filled.Īdded, for a commenter, the fuzzyQuery variable: var fuzzyQuery = '" + nameof(FuzzyMetaMovie) + AS Discriminator, mm.*, fuzzyTitles.distance FROM MetaMovies AS mm, The parent class contains a foreign relation to a list of MetaTitles called Titles.įuzzyMetaMovie exists only to have an extra parameter that can be filled using a raw query.įuzzyMetaMovie doesn't have a table linked to it because the result is gotten using a raw query on MetaMovies table and spellfix1 SQLite extension. The second one is a subclass of the first one. I have two classes: MetaMovie and FuzzyMetaMovie.
0 Comments
Leave a Reply. |