• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Create new table partition with Hibernate on Insert

 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How can I use Hibernate to create new partitions based upon a field value or primary key generator?
When I insert a new row in a table and is inputing a new value on the column which the table is partitioned, how can I get Hibernate to create this partition?

Edit: The correct phrase may be how to add an partition to an existing partition on a table.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You will need to use native sql to do this I'd guess.
 
Sverre Moe
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Sturrock wrote:You will need to use native sql to do this I'd guess.



Thought so too...To bad hibernate doesn't have support for adding partitions.
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure what you mean by "partitions". Hibernate Shards is a horizontal partitioning scheme, but partitioning is also a term sometimes used to indicate fine-grained control of a single database, and in that context, Hibernate isn't likely to be able to help, since that sort of feature is generally going to vary with the database vendor.

DBMS-specific partitioning is also not usually something that apps would be doing, since it's mostly about performance and physical robustness, which are generally best maintained across the enterprise by the DBA, whose job it is to balance resources for the enterprise as a whole.
reply
    Bookmark Topic Watch Topic
  • New Topic