Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Problem with JPA and User-defined type in Oracle
Problem with JPA and User-defined type in Oracle [message #1096786] Wed, 28 August 2013 21:36
Ivan Krstic is currently offline Ivan KrsticFriend
Messages: 1
Registered: August 2013
Junior Member
hi,

i have user-defined type in oracle db:
create or replace 
TYPE "OBJ_NOSILAC_OSIGURANJA" AS OBJECT (
  INSURANCE_HOLDER CHAR(1),
  INSURANCE_HOLDER_FIRSTNAME VARCHAR2(30),
  INSURANCE_HOLDER_LASTNAME VARCHAR2(30),
  INSURANCE_HOLDER_P_NUMBER VARCHAR2(13),
  INSURANCE_HOLDER_INSURANCE VARCHAR2(11),
  MEMBER FUNCTION get_INSURANCE_HOLDER RETURN CHAR,
  MEMBER FUNCTION get_INSURANCE_HOLDER_FIRSTNAME RETURN VARCHAR2,
  MEMBER FUNCTION get_INSURANCE_HOLDER_LASTNAME RETURN VARCHAR2,
  MEMBER FUNCTION get_INSURANCE_HOLDER_P_NUMBER RETURN VARCHAR2,
  MEMBER FUNCTION get_INSURANCE_HOLDER_INSURANCE RETURN VARCHAR2
) instantiable not final;


also, i have table that use that type:
CREATE TABLE "DENTIST"."PATIENT_DETAIL" 
   (	"ID_PATIENT" NUMBER(*,0) NOT NULL ENABLE, 
	"INSURANCE_HOLDER" "DENTIST"."OBJ_NOSILAC_OSIGURANJA" ,......)


in my procest, i used JPA with eclipselink 2.5.0 and have entity java class:
@Entity
@Table(name="patient_detail")
public class Patient {
  private Integer id_patient;
  ....

  @Id
  @GeneratedValue(strategy=GenerationType.IDENTITY)
  public Integer getId_patient() {
 	return id_patient;
  }

  public void setId_patient(Integer id_patient) {
	this.id_patient = id_patient;
  }


i don't know how to use field in my class with user-defined type in oracle db?
Previous Topic:Regression 2.4.1 -> 2.4.2
Next Topic:[resolved] Problem with Inserting/Updating in DescriptorEventListener callback methods
Goto Forum:
  


Current Time: Tue Apr 23 08:21:49 GMT 2024

Powered by FUDForum. Page generated in 0.02821 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top