pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #14712: postgres how to handle boolean datatype to use 0 and 1 using hibernate
2+ messages / 2 participants
[nested] [flat]
* BUG #14712: postgres how to handle boolean datatype to use 0 and 1 using hibernate
@ 2017-06-19 07:09 aprasad@flexerasoftware.com
2017-06-19 15:01 ` Re: BUG #14712: postgres how to handle boolean datatype to use 0 and 1 using hibernate David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: aprasad@flexerasoftware.com @ 2017-06-19 07:09 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 14712
Logged by: Akanksha Prasad
Email address: aprasad@flexerasoftware.com
PostgreSQL version: 9.6.2
Operating system: windows 7
Description:
I wanted to use boolean withd efault value as 1 in hbm file , the hibernate
generates the ddl for sql server and oracle and they both works fine but
postgres fails with error as cannot have int default 1 as value for boolean
field.
Please help with this. How can i do this with changes only at the dialect
level beacuse changing the application me too many changes and that too sql
server and oracle databases with fail.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #14712: postgres how to handle boolean datatype to use 0 and 1 using hibernate
2017-06-19 07:09 BUG #14712: postgres how to handle boolean datatype to use 0 and 1 using hibernate aprasad@flexerasoftware.com
@ 2017-06-19 15:01 ` David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: David G. Johnston @ 2017-06-19 15:01 UTC (permalink / raw)
To: aprasad@flexerasoftware.com; +Cc: pgsql-bugs
On Mon, Jun 19, 2017 at 12:09 AM, <aprasad@flexerasoftware.com> wrote:
> The following bug has been logged on the website:
>
> Bug reference: 14712
> Logged by: Akanksha Prasad
> Email address: aprasad@flexerasoftware.com
> PostgreSQL version: 9.6.2
> Operating system: windows 7
> Description:
>
> I wanted to use boolean withd efault value as 1 in hbm file , the hibernate
> generates the ddl for sql server and oracle and they both works fine but
> postgres fails with error as cannot have int default 1 as value for boolean
> field.
> Please help with this. How can i do this with changes only at the dialect
> level beacuse changing the application me too many changes and that too sql
> server and oracle databases with fail.
>
Please send non-bug-report questions to pgsql-general@postgresql.org or a
more appropriate list if there is one.
Thank You.
David J.
p.s. It sounds to me, though, that if Hibernate is translating between
dialects that you should be able to specify "default true" for your boolean
column and let it make that work with the other DBMSes - a true boolean
column only stores "True" and "False" by definition.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2017-06-19 15:01 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-06-19 07:09 BUG #14712: postgres how to handle boolean datatype to use 0 and 1 using hibernate aprasad@flexerasoftware.com
2017-06-19 15:01 ` David G. Johnston <david.g.johnston@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox