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
Entity framework CreateDatabaseScript gives false results [DNET379] #384
Comments
Commented by: Leonard Wennekers (l.wennekers) The files has some comments with the text //IOLAN MODIFICATION After this test a fix is made for creating the right tablenames for the CreateDatabaseScript function/ However for the length of the associations there is nothing done. |
Modified by: Leonard Wennekers (l.wennekers)Attachment: SSDLToFB.cs [ 11952 ] |
Modified by: @cincuranetstatus: Open [ 1 ] => In Progress [ 3 ] |
Commented by: @cincuranet Thanks for reporting, although the patch is wrong. The code is generated form T4 template and the template itself must be independent (because it might be run outside provider). |
Modified by: @cincuranetpriority: Major [ 3 ] => Minor [ 4 ] |
Commented by: Jens Duczmal (jensd) Dear Jiri, it seems, that the TableAttribute is still ignored. CreateDatabaseScript does contain only the Classname as Tablename, not the string declared in [Table("DifferentName)"]-Attribute. Any Ideas, when this might be fixed? It will be very useful, if we could use CodeFirst inkl. generation Script. Edit: Version 2.7 (and probably 2.7.5 as well, becuase this ticket ist still open) |
Commented by: @cincuranet Probably after 2.8 is out. |
Commented by: Jens Duczmal (jensd) Hm....anyway, thanks for this reply. Remapping of Colum-Names does work already very well. Just the Tablename does make problems. I would be very grateful if you could try to get the Table-Attribute fixed within 2.8. We are struggling just 10 meters in front of the finishing line. |
Commented by: @cincuranet I'm trying it right now, and I have my EDMX model with entity name different from table name and the call to CreateDatabaseScript (on ObjectContext) gives right result. Can you provide a test case? |
Commented by: Jens Duczmal (jensd) Thanks, I appreciate this good news :) I can send you something tomorrow morning GMT. [Table("100_Customer")]
} The Column-Tag for renaming a Column does work fine. But the similar Table-Tag does not. |
Commented by: Leonard Wennekers (l.wennekers) Thanks Jens for creating the test. I searched for my test but I lost It. |
Commented by: Jens Duczmal (jensd) Sample file for CodeFirst with Table-Annotation |
Modified by: Jens Duczmal (jensd)Attachment: Tracker379.zip [ 12181 ] |
Commented by: Jens Duczmal (jensd) Sorry, the file is as big because I mistakely zipped the EF-Nuget-Package. Just create an empty Database, change the file and start it. Probably not the best example, but I'm not able to get "DropCreateDatabaseInitializer" running with Firebird. |
Modified by: @cincuranetstatus: In Progress [ 3 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: vNext [ 10470 ] |
Commented by: Jens Duczmal (jensd) Thank you, Jiri. |
Submitted by: Leonard Wennekers (l.wennekers)
Attachments:
SSDLToFB.cs
Tracker379.zip
Votes: 1
The result of the CreateDatabaseScript function from the EntityFramework gives a false result. The TableNames is uses are just the names of the Entity and not the real tablenames configured by it's configurations. The bug commes inside SSDLToFB.cs where I did some trials.
The same function CreateDatabaseScript also create some errors with associations. The maximum length of associations is 32 charaters by with the CreateDatabaseScript function they can bw much longer because they are concatinated from the entity names. This also gives some problems when using the script created.
The text was updated successfully, but these errors were encountered: