From: Asbjørn U. (J. <nh...@gm...> - 2010-08-19 10:58:00
|
[ http://216.121.112.228/browse/NH-2200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19679#action_19679 ] Asbjørn Ulsberg commented on NH-2200: ------------------------------------- @Matthew If you know how to create the required parts of the dialect to support foreign keys (in both create and update table statements), perhaps other people in the community (like me) can take that as a basis and somehow make it work. Would it be possible for you to create a patch that provides this functionality? It would be greatly appreciated! > SchemaExport: include foreign keys in CREATE TABLE (for SQLite) > --------------------------------------------------------------- > > Key: NH-2200 > URL: http://216.121.112.228/browse/NH-2200 > Project: NHibernate > Issue Type: Improvement > Components: DataProviders / Dialects > Affects Versions: 2.1.2.GA > Reporter: Matthew Gabeler-Lee > > Since newer versions of SQLite support foreign key enforcement, it would be nice if the schema export functionality in NHibernate could generate foreign key clauses when working with the SQLite dialect. > Right now what's stopping this from being a trivial change to the SQLiteDialect class is that NHibernate only creates foreign keys with an ALTER TABLE statement, and SQLite doesn't support that. If NHibernate supported including the foreign keys in the CREATE TABLE statement, then SQLite's foreign key support could be used. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Bogdan C. (JIRA) <nh...@gm...> - 2010-10-20 23:31:02
|
[ http://216.121.112.228/browse/NH-2200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=20056#action_20056 ] Bogdan Costea commented on NH-2200: ----------------------------------- I've run into the same issue. Looking at it I realized that something is fishy. It seems that all FK's are added using ALTER's, not inlined in the CREATE TABLE, regardless of dialect. This is really tricky, because SQLite doesn't support ALTER TABLE ADD CONSTRAINT but it supports FK's in inlined CREATE TABLE... so the problem can't really be fixed in the dialect. A fixing patch would modify NHibernate.Mapping.Table, NHibernate.Dialect.Dialect and it would mean creating a new SQLite dialect, with a different name, just to be backward compatible. Modifying NHibernate.Mapping.Table and NHibernate.Dialect.Dialect is required to add support for creating foreign keys in CREATE TABLE. Would such a patch that covers Table, Dialect and a new SQLite dialect class be accepted? > SchemaExport: include foreign keys in CREATE TABLE (for SQLite) > --------------------------------------------------------------- > > Key: NH-2200 > URL: http://216.121.112.228/browse/NH-2200 > Project: NHibernate > Issue Type: Improvement > Components: DataProviders / Dialects > Affects Versions: 2.1.2.GA > Reporter: Matthew Gabeler-Lee > > Since newer versions of SQLite support foreign key enforcement, it would be nice if the schema export functionality in NHibernate could generate foreign key clauses when working with the SQLite dialect. > Right now what's stopping this from being a trivial change to the SQLiteDialect class is that NHibernate only creates foreign keys with an ALTER TABLE statement, and SQLite doesn't support that. If NHibernate supported including the foreign keys in the CREATE TABLE statement, then SQLite's foreign key support could be used. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-09 16:57:49
|
[ http://216.121.112.228/browse/NH-2200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-2200. --------------------------- Resolution: Obsolete Fixed in revision 5543 by Patrick > SchemaExport: include foreign keys in CREATE TABLE (for SQLite) > --------------------------------------------------------------- > > Key: NH-2200 > URL: http://216.121.112.228/browse/NH-2200 > Project: NHibernate > Issue Type: Improvement > Components: DataProviders / Dialects > Affects Versions: 2.1.2.GA > Reporter: Matthew Gabeler-Lee > > Since newer versions of SQLite support foreign key enforcement, it would be nice if the schema export functionality in NHibernate could generate foreign key clauses when working with the SQLite dialect. > Right now what's stopping this from being a trivial change to the SQLiteDialect class is that NHibernate only creates foreign keys with an ALTER TABLE statement, and SQLite doesn't support that. If NHibernate supported including the foreign keys in the CREATE TABLE statement, then SQLite's foreign key support could be used. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-09 16:58:04
|
[ http://216.121.112.228/browse/NH-2200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo reopened NH-2200: ----------------------------- Assignee: Patrick Earl > SchemaExport: include foreign keys in CREATE TABLE (for SQLite) > --------------------------------------------------------------- > > Key: NH-2200 > URL: http://216.121.112.228/browse/NH-2200 > Project: NHibernate > Issue Type: Improvement > Components: DataProviders / Dialects > Affects Versions: 2.1.2.GA > Reporter: Matthew Gabeler-Lee > Assignee: Patrick Earl > > Since newer versions of SQLite support foreign key enforcement, it would be nice if the schema export functionality in NHibernate could generate foreign key clauses when working with the SQLite dialect. > Right now what's stopping this from being a trivial change to the SQLiteDialect class is that NHibernate only creates foreign keys with an ALTER TABLE statement, and SQLite doesn't support that. If NHibernate supported including the foreign keys in the CREATE TABLE statement, then SQLite's foreign key support could be used. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Fabio M. (JIRA) <nh...@gm...> - 2011-05-09 16:58:24
|
[ http://216.121.112.228/browse/NH-2200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fabio Maulo closed NH-2200. --------------------------- Resolution: Obsolete > SchemaExport: include foreign keys in CREATE TABLE (for SQLite) > --------------------------------------------------------------- > > Key: NH-2200 > URL: http://216.121.112.228/browse/NH-2200 > Project: NHibernate > Issue Type: Improvement > Components: DataProviders / Dialects > Affects Versions: 2.1.2.GA > Reporter: Matthew Gabeler-Lee > Assignee: Patrick Earl > > Since newer versions of SQLite support foreign key enforcement, it would be nice if the schema export functionality in NHibernate could generate foreign key clauses when working with the SQLite dialect. > Right now what's stopping this from being a trivial change to the SQLiteDialect class is that NHibernate only creates foreign keys with an ALTER TABLE statement, and SQLite doesn't support that. If NHibernate supported including the foreign keys in the CREATE TABLE statement, then SQLite's foreign key support could be used. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |