Hello
I am facing some problems with BIT type of Postgresql. I googled the exception but cannot map out the solution.
Here is the column in table with is miscreant :P
Code:
TABLE public.defect
ADD COLUMN is_rectification_required bit(30);
Here is the generated code for this column
Code:
private Byte isRectificationRequired;
when i try to insert a record i face the following exception. What is wrong with as i used hibernate to generate
Code:
ERROR [main] (JDBCExceptionReporter.java:78) - ERROR: column "is_rectification_required" is of type bit but expression is of type smallint
ERROR [main] (AbstractFlushingEventListener.java:301) - Could not synchronize database state with session
org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:253)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:237)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
Please help me with this problem
Kind Regards
Shakeel Abbas