I am using PostgreSQL and SQL PowerArchitect to design a physical datamodel. As I am using Hibernate which can directly persist Java objects in the database, I thought of using Java_Object as the type in SQL PowerArchitect. When I execute the query, I get this error. Kindly let me know if the type actually doesnt exist in PostgreSQL or I am making some mistake. Googling I am unable to find many reference to the data type.
CREATE TABLE public.Product_Info (
productinfoid VARCHAR NOT NULL DEFAULT nextval('public.product_info_productinfoid_seq'),
productbasic VARCHAR NOT NULL,
Product_Tags JAVA_OBJECT,
Product_Categories JAVA_OBJECT,
Product_Ship_Time JAVA_OBJECT,
CONSTRAINT productinfoid PRIMARY KEY (productinfoid, productbasic)
)
INFO 15-09 10:12:04,300 - sql statement failed: ERROR: type "java_object" does not exist
java_objectis not datatype in Postgres (all datatypes are documented here: postgresql.org/docs/current/static/datatype.html). Why would you want to store a complete (serialized) Object as a single column in the database. This is almost always a bad idea.