Home » Support » Forum » @AttributeOverrides , and postgresql + own TYPE

@AttributeOverrides , and postgresql + own TYPE

#1

Hello, 

first of all i want to thank for this is site. I'm begginer in Java and also in JPA and this site is very helpful for me. Now What is my problem. Unfortunately  i have to work with postgresql + JPA + eclipselink, because is my school project. Database is final and i can't do any changes even if i wanted to. In structure of DB  is this.

--
-- Name: address; Type: TYPE; Schema: artio; Owner: facman
--

 

CREATE TYPE address AS (
street character varying,
city character varying,
state character varying,
country character varying,
zip character varying,
note character varying
);
ALTER TYPE artio.address OWNER TO facman;

AS you notice, in my project i have more schemats let say "public' and "artio".
i upload you screenshoot of my table called "property" http://img822.imageshack.us/i/18591958.png/

Netbeans generate for me entity class.

problem is exactly in the column address because is not typical date type but user defined. I found some example in your sites here http://www.objectdb.com/api/java/jpa/AttributeOverride  but I'cant make it works. Also I have several questions.

1.Can i get access to direct value of address  ? Type "address" is consist with variables street,city,zip etc. 

2.How should look like get and set method ... shoud be 1 set and 1 get method for Address or for each part (street,zip,etc). 

3.If there will be getAddress method what data type it will be ? Array ? 

4.I uploded for you my entity class of table Property (attached) and i please need your help, or i will die in front my keyboard with trying. It is only one file, having 135 line. Very much thank you for your help and I hope for answer. 

Best Regards Adam

 

#2

Your questions demonstrate one of the advantages of using ObjectDB - you can store your objects as is without the need to handle mapping issues.

However, this forum is for ObjectDB users not for PostgreSQL / EclipseLink users.

Please post your questions on PostgreSQL / EclipseLink forums, StackOverflow, etc.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
#3

Thanks for your help surprise

#4

There is no reason for you to be surprised.

Asking for advice about ORM problems in an object database forum is like asking for advice about meat recipes in a forum of vegetarian people.

Fortunately, we do not have to deal with these problems.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)

Post Reply

To post a reply and/or subscribe to update notifications - please login