Skip to content
This repository has been archived by the owner on Oct 28, 2020. It is now read-only.

Update references to version 1.2 #5

Closed
wants to merge 1 commit into from

Conversation

JosephTremoulet
Copy link
Contributor

Also suppress a warning that this version emits regarding use of Take
without OrderBy in a SQL query.

Also suppress a warning that this version emits regarding use of Take
without OrderBy in a SQL query.
@JosephTremoulet
Copy link
Contributor Author

JosephTremoulet commented Nov 29, 2016

@rynowak PTAL.

Note that the new EntityFramework version spits out a couple warnings when running this code. I've disabled this one per the instructions printed with the warning:

warn: Microsoft.EntityFrameworkCore.Query.Internal.SqlServerQueryCompilationContextFactory[2]
Query: '(from Genre g in DbSet select g.Name).Take(__p_0)' uses a row limiting operation (Skip/Take)
without OrderBy which may lead to unpredictable results. To configure this warning use the DbContextOptionsBuilder.ConfigureWarnings
API (event id 'CoreEventId.CompilingQueryModel'). ConfigureWarnings can be used when overriding the
DbContext.OnConfiguring method or using AddDbContext on the application service provider.

But I haven't been able to suppress this one (which appears 3x, once for each of 3 different columns):

warn: Microsoft.EntityFrameworkCore.Infrastructure.RelationalModelValidator[1]
No type was specified for the decimal column 'UnitPrice' on entity type 'OrderDetail'. This will cause values to be
silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type
that can accomadate all the values using 'ForSqlServerHasColumnType()'. To configure this warning use the DbContextOpt
ionsBuilder.ConfigureWarnings API (event id 'SqlServerEventId.DefaultDecimalTypeWarning'). ConfigureWarnings can be used
when overriding the DbContext.OnConfiguring method or using AddDbContext on the application service provider.

I can't find an overload of Ignore that takes a SqlServerEventId, not sure if that's an oversight or NYI or what (note I can find an overload for InMemoryEventId and an overload for RelationalEventId)...

Happy for advice on how to handle the warnings / where to route issues. I also wasn't sure if fixing the code to not do what the warnings are complaining about is something that should happen either here or in some "upstream" code.

@rynowak
Copy link
Member

rynowak commented Nov 30, 2016

Thanks @JosephTremoulet - The changes to the versions look fine. I'll take care of merging.

I'm not sure why the 1.2.0 versions weren't already in use here since that was the intent.

For now I'd like to just loop in someone from the EF side to understand these warnings. MusicStore is a sample we run elsewhere as an integration test and it's possible that no human has seen these errors. It's likely that these warnings are for a real issue that we should fix in the sample. If this is blocking for some reason let me know.

@rynowak
Copy link
Member

rynowak commented Nov 30, 2016

1e67395

@rynowak rynowak closed this Nov 30, 2016
@rynowak
Copy link
Member

rynowak commented Nov 30, 2016

I merged the version changes but not the warning part. I'll have someone from EF help with that since we have to change it elsewhere. Thanks 👍

@JosephTremoulet
Copy link
Contributor Author

@rynowak great, thanks; the warnings are indeed non-blocking and I'm happy to live with them while waiting for a real fix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants