Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The generated metadata script by using CreateDatabaseScript from a context only uses defined entity types [DNET829] #764

Closed
firebird-automations opened this issue Jun 13, 2018 · 6 comments

Comments

@firebird-automations
Copy link

Submitted by: Leonard Wennekers (l.wennekers)

I'm using the following code to generate my metadata script:

var adapter = ((IObjectContextAdapter)context).ObjectContext;
var script = adapter.CreateDatabaseScript();

Earlier versions of the provider were generating the complete script of my database for the tables, views, indexes and triggers.
Now it's only creating the tables I configured as entitytypes. Even the extra tables I create by using the migrator are not
inside the script anymore.

Is this a result of a breaking issue????

Thanks already in advance for your support and kind regards,
Leonard Wennekers

@firebird-automations
Copy link
Author

Modified by: @cincuranet

Component: Entity Framework [ 10110 ]

Component: http://ADO.NET Provider [ 10041 ] =>

@firebird-automations
Copy link
Author

Commented by: @cincuranet

Not sure what you're talking about. EF doesn't know know about triggers or views, so there's definitely nothing like that generated (except like PK index etc.). Better to provide reproducible scenario.

@firebird-automations
Copy link
Author

Modified by: @cincuranet

status: Open [ 1 ] => In Progress [ 3 ]

@firebird-automations
Copy link
Author

Commented by: Leonard Wennekers (l.wennekers)

Hello Jiri,
It's easy to reproduce. Take a database with multiple tables with triggers and indexes.
Create for some, not all tables EntityTypes.

Run the following lines on the 5.12 and 6.0 adapter and you will notice the differences.

var adapter = ((IObjectContextAdapter)context).ObjectContext;
var script = adapter.CreateDatabaseScript();

I hope that this is sufficient information for you to reproduce
With kind regards,
Leonard Wennekers

@firebird-automations
Copy link
Author

Commented by: @cincuranet

Same script for both 5.12.1 and 6.0.0 of provider (on EF 6.2). As expected.

@firebird-automations
Copy link
Author

Modified by: @cincuranet

status: In Progress [ 3 ] => Closed [ 6 ]

resolution: Cannot Reproduce [ 5 ]

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

No branches or pull requests

2 participants