-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: ID Generation with Multi-Tenancy (DATABASE)
PostPosted: Tue Jan 28, 2014 5:26 pm 
Newbie

Joined: Tue Jan 28, 2014 4:57 pm
Posts: 1
I have a Spring + Hibernate web app running with a Multi-Tenancy DATABASE strategy. My understanding is that each tenant gets its own database that is entirely independent of the other tenants' databases. However, I've noticed that the generated IDs for any given table "bleed" into other databases. That is, if the latest row in a table for customer 1 has ID 100, and a row is added to customer 2's corresponding table, customer 2's ID will be 101.

Is this the expected behavior, or have I misconfigured something? The annotations on my models are:
Code:
@GeneratedValue( generator = "increment" )
@GenericGenerator( name = "increment", strategy = "increment" )

I would use GenerationType.AUTO but then I get errors on classes that extend other classes.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.