Re: Hibernate, web application and only one sequence for all primary keys

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Hibernate, web application and only one sequence for all primary keys
Дата
Msg-id 4AB2E9FE.9080006@postnewspapers.com.au
обсуждение исходный текст
Ответ на Re: Hibernate, web application and only one sequence for all primary keys  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
Tom Lane wrote:
> rawi <only4com@web.de> writes:
>> Grails/Hibernate wishes per default one sequence for all tables-PKs and all
>> PKs as BigInt.
> 
> Redesign that software; this is fundamentally broken and stupid.

It's a pretty silly default, but it's clearly intended for simple /
small databases. In any real database you'll be using one sequence per
generated PK. I've had no problems with this with Hibernate, and am a
bit puzzled that the OP is trying to fit their DB to Hibernate rather
than doing the trivial configuration required to get Hibernate to fit
the DB.

The Hibernate documentation is pretty good, and covers this sort of
thing well.

--
Craig Ringer


В списке pgsql-sql по дате отправления:

Предыдущее
От: Frank Bax
Дата:
Сообщение: Re: extracting from epoch values in pgsql
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Rules, functions and RETURNING