zzzprojects/EntityFramework.DynamicFilters

[Oracle EF] Added Dynamic Filter to existing table

KennyEng12 opened this issue · 16 comments

Hi @jcachat @stgelaisalex @jaenyph @JonathanMagnan @waqasm78 ,
I'm using Dynamic Filter for Oracle EF.

I'm having an issue, which is same with #54.
But I don't want to delete all previous migrations and create a new initial migration.

I'm wondering if there any solutions for this issue without delete all previous migrations and create a new initial migration?

Thanks.
Kenny

Hello @KennyEng12 ,

Unfortunately there is no other fix that I know ;(

Best Regards,

Jonathan

Hi Jonathan,

It means the only way to resolve this issue is to ensure Dynamic Filter is applied at the time of table creation with reference to #54.

Any plan to rectify this shortcoming for applying Dynamic Filter on existing Oracle tables?

Best regards,
Tommy

Hello @KennyEng12 , @tom177y ,

If you can provide a "working" project with this issue, I will assign a developer a few hours to look at it to see if he can find something. Perharps he will find a solution to it.

If you need to send in it private, you can send it here info@zzzprojects.com

Hi @JonathanMagnan ,

Here is the: Sample Project

I've implemented DynamicFilter in ~/Models/IdentityModels.cs (ApplicationDbContext class).

Thanks,
Kenny

Thank a lot @KennyEng12 ,

We will look at it.

Best Regards,

Jonathan

Thank you @JonathanMagnan ,

Hope can get a solution from you.

Thanks,
Kenny

Hi @JonathanMagnan,

Wondering if there is any update on this issue?

Thanks.
/Tommy

Hello @tom177y , @KennyEng12 ,

Unfortunately, my developer tried last week and a few hours this week without any progression.

So we will have to abandon it for now until we discover something that could lead us to a solution on this one.

Hi @JonathanMagnan ,

Thanks for helping us to discover.

So I will leave this OPEN until your team discover something?

Thanks,
Kenny.

Hello @KennyEng12 ,

Yes, keep it open.

We need often to play directly in the EF6 source code when developing some feature in EF Classic, so we will try to keep this migration issue in mind when we will do something on it.

Hi everyone, I want to let you know that I have confirmed a bug in Oracle's SQL Generator for EF when using "AlterTableAnnotations" in a migrations. That is the source of this bug and is not related to just EF.DF. (on CreateTable is fine, but another confusing point is that the error for AlterTableAnnotations says CreateTable which is wrong)

(proof: https://github.com/Worthy7/OracleTestAlterTableAnnotations)

There is no fix for this right now, I don't actually fully understand what "annotations" are on a table to be honest, I don't understand how it affects anything since no SQL is generated, but, please confirm @JonathanMagnan , I think you can just delete any AlterTableAnnotations from your migrations to keep Oracle quiet.

Hi everyone, I want to let you know that I have confirmed a bug in Oracle's SQL Generator for EF when using "AlterTableAnnotations" in a migrations. That is the source of this bug and is not related to just EF.DF. (on CreateTable is fine, but another confusing point is that the error for AlterTableAnnotations says CreateTable which is wrong)

(proof: https://github.com/Worthy7/OracleTestAlterTableAnnotations)

There is no fix for this right now, I don't actually fully understand what "annotations" are on a table to be honest, I don't understand how it affects anything since no SQL is generated, but, please confirm @JonathanMagnan , I think you can just delete any AlterTableAnnotations from your migrations to keep Oracle quiet.

just wondering if this ever got answered? After (#153) was fixed I could get migrations generating from initialMigration again, but this annoying problem popped up instead.

I believe the issue is caused by DF trying to do an "AltertableAnnotations", can it somehow be removed without reprecussion?

Will be able to answer you soon ;) I should investigate it at the beginning of next week.

If I don't find any good reason, I will just add an option to allow you to disable this part of the code

Hello @worthy7 ,

The annotation is used to later be able to catch later the filter configuration through the metadata property. For example, here: https://github.com/zzzprojects/EntityFramework.DynamicFilters/blob/master/src/EntityFramework.DynamicFilters.Shared/DynamicFilterQueryVisitorCSpace.cs#L280

So that's pretty much the core logic of how the DF library is working and would be very hard to remove.

Unfortunately, we cannot remove it without repercussion. It will require us way too much code rewrite doing something like this.

Not the answer you wished but at least we now know that doing this request will require too much effort.