From: Chris N. <ch...@si...> - 2002-10-18 06:37:03
|
I'm trying to reduce the number of properties required to switching between databases. I think hibernate could automatically determine the proper dialect once it is connected to the database, via conn.getMetaData().getDatabaseProductName() It doesn't appear that the dialect needs to be known prior to connection, but I could easily be wrong about that. Another issue is that not all databases may have full jdbc metadata support, but this would be easy enough to find out. Thoughts? -Chris |
From: Christoph S. <ch...@mc...> - 2002-10-18 08:56:56
|
I think its a good idea because every feature that makes hibernate more auto-configuring is a good feature. I wanted to work on the dialects anyway, so I will take a look at this too if its ok for the others too :) -chris ----- Original Message ----- From: "Chris Nokleberg" <ch...@si...> To: <hib...@li...> Sent: Friday, October 18, 2002 8:37 AM Subject: [Hibernate] Automatically determining dialect > I'm trying to reduce the number of properties required to switching > between databases. I think hibernate could automatically determine the > proper dialect once it is connected to the database, via > > conn.getMetaData().getDatabaseProductName() > > It doesn't appear that the dialect needs to be known prior to > connection, but I could easily be wrong about that. > > Another issue is that not all databases may have full jdbc metadata > support, but this would be easy enough to find out. Thoughts? > > -Chris > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > hibernate-devel mailing list > hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > |
From: Gavin K. <ga...@ap...> - 2002-10-18 10:01:07
|
Do it :) ----- Original Message ----- From: "Christoph Sturm" <ch...@mc...> To: "Chris Nokleberg" <ch...@si...>; <hib...@li...> Sent: Friday, October 18, 2002 6:57 PM Subject: Re: [Hibernate] Automatically determining dialect > I think its a good idea because every feature that makes hibernate more > auto-configuring is a good feature. I wanted to work on the dialects anyway, > so I will take a look at this too if its ok for the others too :) > > -chris > ----- Original Message ----- > From: "Chris Nokleberg" <ch...@si...> > To: <hib...@li...> > Sent: Friday, October 18, 2002 8:37 AM > Subject: [Hibernate] Automatically determining dialect > > > > I'm trying to reduce the number of properties required to switching > > between databases. I think hibernate could automatically determine the > > proper dialect once it is connected to the database, via > > > > conn.getMetaData().getDatabaseProductName() > > > > It doesn't appear that the dialect needs to be known prior to > > connection, but I could easily be wrong about that. > > > > Another issue is that not all databases may have full jdbc metadata > > support, but this would be easy enough to find out. Thoughts? > > > > -Chris > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > hibernate-devel mailing list > > hib...@li... > > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > hibernate-devel mailing list > hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel |
From: Chris N. <ch...@si...> - 2002-10-18 17:03:29
|
On Fri, Oct 18, 2002 at 10:57:15AM +0200, Christoph Sturm wrote: > I think its a good idea because every feature that makes hibernate more > auto-configuring is a good feature. I wanted to work on the dialects anyway, > so I will take a look at this too if its ok for the others too :) It might also be nice if you could specify database-dependent properties, which will only get picked up if the corresponding dialect is in use. For example, something like hibernate.connection.url.mysql = jdbc:mysql:///test hibernate.connection.url.postgresql = jdbc:postgresql:template1 Maybe there is a better syntax. Then, the only thing you'd *have* to change would be the driver_class. Don't know a way around that one. -Chris |