* Apps/EOModelEditor/EOModelEditorApp.m set the model name

correctly for SQLite3 databases too, use the file name


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@36417 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
buzzdee 2013-03-24 16:13:48 +00:00
parent 9ec222663c
commit 9639650610
2 changed files with 7 additions and 1 deletions

View file

@ -131,7 +131,11 @@
[channel openChannel];
newModel = [channel describeModelWithTableNames:[channel describeTableNames]];
[newModel setConnectionDictionary:[adaptor connectionDictionary]];
[newModel setName: [[adaptor connectionDictionary] objectForKey:@"databaseName"]];
// PostgreSQL has a databaseName, SQLite3 has a databasePath in its connectionDictionary
if ([[adaptor connectionDictionary] objectForKey:@"databaseName"] != nil)
[newModel setName: [[adaptor connectionDictionary] objectForKey:@"databaseName"]];
else
[newModel setName: [[[adaptor connectionDictionary] objectForKey:@"databasePath"] lastPathComponent]];
[channel closeChannel];
[self newDocumentWithModel:newModel];
}

View file

@ -5,6 +5,8 @@
* EOAdaptors/SQLiteAdaptor/SQLite3Channel.m
implement describeModelWithTableNames:, inspired from the
PostgreSQLChannel.m
* Apps/EOModelEditor/EOModelEditorApp.m set the model name
correctly for SQLite3 databases too, use the file name
2013-03-14: Sebastian Reitenbach <sebastia@l00-bugdead-prods.de>
* EOAdaptors/SQLiteAdaptor/LoginPanel/SQLite3LoginPanel.m