1

we have timestamptz field in table. Please tell me, How to set this field type in XML mapping? and Also how to add an entry to the column programatically?

message Table

CREATE TABLE message (
        id SERIAL NOT NULL,
        isprocessed INT4 DEFAULT 0,
        processed_date TIMESTAMPTZ,
        notecontents TEXT(2147483647),
        ack_date TIMESTAMPTZ
    ); 
4
  • 1
    This is a similar question stackoverflow.com/questions/1289492/… Commented Aug 7, 2015 at 7:40
  • @LeBarton Thank for quick response... I'm using XML mapping, I wanted to know how to map this type of field in .hbm file Commented Aug 7, 2015 at 7:55
  • The answer is still accurate. Hibernate only supports ansi SQL datatypes. Timestamptz is not part of the standard. You will either need to create a type mapper or change the column's data type. Commented Aug 7, 2015 at 8:00
  • Possible duplicate of Hibernate Timestamp with Timezone Commented Apr 2, 2019 at 4:10

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.