Note that there are some explanatory texts on larger screens.

plurals
  1. PODoes hbm2ddl.auto=update not honor different DB users, maybe?
    primarykey
    data
    text
    <p>We are encountering strange hibernate behavior with <code>hbm2ddl.auto</code> set to <code>update</code>.</p> <p>In our test setup, we have two database users, one containing the tables for our beta application, the other one is mainly used for development. I.e. same table names with different users. When new tables are to be created, we do so by using <code>hbm2ddl.auto=update</code>.</p> <p>Now suddenly the strange behavior is: the update process looks for existing tables with the wrong user and creates those not found with the right user.</p> <p>E.g. if the following tables exists</p> <pre><code>USER_A.TABLE_1 USER_B.TABLE_2 </code></pre> <p>and we update with three tables configured: <code>TABLE_1, TABLE_2, TABLE_3</code> using USER_B, we end up with</p> <pre><code>USER_A.TABLE_1 USER_B.TABLE_2 USER_B.TABLE_3 </code></pre> <p><code>TABLE_1</code> is not created for <code>USER_B</code>. After renaming <code>USER_A.TABLE_1</code> to <code>USER_A.TABLE_0</code> and updating again we end up with the expected result:</p> <pre><code>USER_A.TABLE_0 USER_B.TABLE_1 USER_B.TABLE_2 USER_B.TABLE_3 </code></pre> <p>Does this make any sense to anyone? Is there something like an internal hibernate cache remembering like "Hey I have already created this table on this server (and I do not care about the user)".</p> <p>We have spent quite some testing to reassure this is not a configuration problem, reproduced this on different machines, different configurations, from ant or using the IDE, making sure USER_A's password cannot be found anywhere in the build directory etc. So we are 100% sure, the behavior is as described - but we are completely out of ideas what happens.</p> <p>I'd be very happy to hear your ideas about this, since this problem is nagging for some time now.</p> <p>Thanks a lot, Peter </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload