Disable the schemaExport on the hibernate [message #114554] |
Wed, 12 March 2008 14:05  |
Eclipse User |
|
|
|
I'm trying to disable the schema export each time I connect to the
database. It takes a long time to connect and if it is a different
schema it tries to update and that is the wrong solution for production
application.
Here is what I tried:
I create properties for hibernate and assign -
props.setProperty(Environment.HBM2DDL_AUTO, "validate");
dataStore.setHibernateProperties(props);
Please note that I need to use the properties because my application
dynamically changes the database connection with the user input. So I
do not have a configuration file and I manage it via properties.
This should not export the schema but only validate it. However, it
does not have any impact on hibernate. Hibernate always rebuild the schema.
Any ideas how to cause Hibernate not to export the schema.
Tunning it OFF is the best option I'm looking for. Validate is my second.
Thanks
Yigal
|
|
|
|
Re: Disable the schemaExport on the hibernate [message #114778 is a reply to message #114567] |
Fri, 14 March 2008 09:10  |
Eclipse User |
|
|
|
Hi Martin,
The TENEO option worked well.
Yes it is confusing that the TENEO overrides the hibernate.
I'll enter a request to clarify it.
Yigal
Martin Taal wrote:
> Hi Yigal,
> There is also a specific Teneo option: PersistenceOptions.UPDATE_SCHEMA,
> this should be set to false. This property should be passed to the
> setPersistenceProperties method.
> I can see that the teneo option is confusing/contradicting related to
> the same kind of option in Hibernate. Can you enter a bugzilla for this?
> Then I can think of a way to make this more intuitive or at least also
> listen to the hibernate property.
>
> gr. Martin
>
> Yigal wrote:
>> I'm trying to disable the schema export each time I connect to the
>> database. It takes a long time to connect and if it is a different
>> schema it tries to update and that is the wrong solution for
>> production application.
>>
>> Here is what I tried:
>> I create properties for hibernate and assign -
>> props.setProperty(Environment.HBM2DDL_AUTO, "validate");
>> dataStore.setHibernateProperties(props);
>>
>> Please note that I need to use the properties because my application
>> dynamically changes the database connection with the user input. So I
>> do not have a configuration file and I manage it via properties.
>>
>> This should not export the schema but only validate it. However, it
>> does not have any impact on hibernate. Hibernate always rebuild the
>> schema.
>>
>> Any ideas how to cause Hibernate not to export the schema.
>> Tunning it OFF is the best option I'm looking for. Validate is my
>> second.
>>
>> Thanks
>> Yigal
>
>
|
|
|
Re: Disable the schemaExport on the hibernate [message #615853 is a reply to message #114554] |
Wed, 12 March 2008 14:23  |
Eclipse User |
|
|
|
Hi Yigal,
There is also a specific Teneo option: PersistenceOptions.UPDATE_SCHEMA, this should be set to
false. This property should be passed to the setPersistenceProperties method.
I can see that the teneo option is confusing/contradicting related to the same kind of option in
Hibernate. Can you enter a bugzilla for this? Then I can think of a way to make this more intuitive
or at least also listen to the hibernate property.
gr. Martin
Yigal wrote:
> I'm trying to disable the schema export each time I connect to the
> database. It takes a long time to connect and if it is a different
> schema it tries to update and that is the wrong solution for production
> application.
>
> Here is what I tried:
> I create properties for hibernate and assign -
> props.setProperty(Environment.HBM2DDL_AUTO, "validate");
> dataStore.setHibernateProperties(props);
>
> Please note that I need to use the properties because my application
> dynamically changes the database connection with the user input. So I
> do not have a configuration file and I manage it via properties.
>
> This should not export the schema but only validate it. However, it
> does not have any impact on hibernate. Hibernate always rebuild the
> schema.
>
> Any ideas how to cause Hibernate not to export the schema.
> Tunning it OFF is the best option I'm looking for. Validate is my second.
>
> Thanks
> Yigal
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Re: Disable the schemaExport on the hibernate [message #615881 is a reply to message #114567] |
Fri, 14 March 2008 09:10  |
Eclipse User |
|
|
|
Hi Martin,
The TENEO option worked well.
Yes it is confusing that the TENEO overrides the hibernate.
I'll enter a request to clarify it.
Yigal
Martin Taal wrote:
> Hi Yigal,
> There is also a specific Teneo option: PersistenceOptions.UPDATE_SCHEMA,
> this should be set to false. This property should be passed to the
> setPersistenceProperties method.
> I can see that the teneo option is confusing/contradicting related to
> the same kind of option in Hibernate. Can you enter a bugzilla for this?
> Then I can think of a way to make this more intuitive or at least also
> listen to the hibernate property.
>
> gr. Martin
>
> Yigal wrote:
>> I'm trying to disable the schema export each time I connect to the
>> database. It takes a long time to connect and if it is a different
>> schema it tries to update and that is the wrong solution for
>> production application.
>>
>> Here is what I tried:
>> I create properties for hibernate and assign -
>> props.setProperty(Environment.HBM2DDL_AUTO, "validate");
>> dataStore.setHibernateProperties(props);
>>
>> Please note that I need to use the properties because my application
>> dynamically changes the database connection with the user input. So I
>> do not have a configuration file and I manage it via properties.
>>
>> This should not export the schema but only validate it. However, it
>> does not have any impact on hibernate. Hibernate always rebuild the
>> schema.
>>
>> Any ideas how to cause Hibernate not to export the schema.
>> Tunning it OFF is the best option I'm looking for. Validate is my
>> second.
>>
>> Thanks
>> Yigal
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03973 seconds