thank you for your answer. i'm attaching the db schema (currently hosted on postgres)
In the table you'll find more foreignkeys like outputrisposte, and have same mapping.
thank you for your help.
Code:
CREATE TABLE risultatiquestionario
(
id bigint NOT NULL,
dtype character varying(255) NOT NULL,
e_version integer NOT NULL,
outputrisposte_risposte_e_id bigint NOT NULL,
outputsintesidistribuzione_sintesidistrubuzione_e_id bigint NOT NULL,
outputhistog_histog_e_id bigint NOT NULL,
out_percentili_percentili_e_id bigint NOT NULL,
out_probabilitascen_probabilitascenario_e_id bigint NOT NULL,
out_scenarioprob_scenarioprob_e_id bigint NOT NULL,
identity bigint,
data_questionario timestamp without time zone,
orainizioquestionario timestamp without time zone,
orafinequestionario timestamp without time zone,
note character varying(255),
out_siar_siar_e_id bigint NOT NULL,
outputpromemoria_promemoria_e_id bigint NOT NULL,
attivitasupervisione_attivitasupervisione_e_id bigint NOT NULL,
flgeseguito_primavolta boolean,
flgrieseguito_nuoveviews boolean,
flgrieseguito_nonconvalidato boolean,
flg_salvatirisultatiparziali boolean,
flg_convalida_supervisioni boolean,
risultatiquestionario_variabileutente_id bigint,
CONSTRAINT risultatiquestionario_pkey PRIMARY KEY (id ),
CONSTRAINT risultatiquestionario_attivitasupervisione FOREIGN KEY (attivitasupervisione_attivitasupervisione_e_id)
REFERENCES attivitasupervisione (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT risultatiquestionario_histog FOREIGN KEY (outputhistog_histog_e_id)
REFERENCES outputhistog (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT risultatiquestionario_percentili FOREIGN KEY (out_percentili_percentili_e_id)
REFERENCES out_percentili (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT risultatiquestionario_probabilitascenario FOREIGN KEY (out_probabilitascen_probabilitascenario_e_id)
REFERENCES out_probabilitascen (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT risultatiquestionario_promemoria FOREIGN KEY (outputpromemoria_promemoria_e_id)
REFERENCES outputpromemoria (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT risultatiquestionario_risposte FOREIGN KEY (outputrisposte_risposte_e_id)
REFERENCES outputrisposte (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT risultatiquestionario_scenarioprob FOREIGN KEY (out_scenarioprob_scenarioprob_e_id)
REFERENCES out_scenarioprob (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT risultatiquestionario_siar FOREIGN KEY (out_siar_siar_e_id)
REFERENCES out_siar (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT risultatiquestionario_sintesidistrubuzione FOREIGN KEY (outputsintesidistribuzione_sintesidistrubuzione_e_id)
REFERENCES outputsintesidistribuzione (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT risultatiquestionario_variabileutente FOREIGN KEY (risultatiquestionario_variabileutente_id)
REFERENCES variabileutente (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION
)
WITH (
OIDS=FALSE
);
CREATE TABLE outputrisposte
(
id bigint NOT NULL,
dtype character varying(255) NOT NULL,
e_version integer NOT NULL,
identity bigint,
risposta_domanda1_a character varying(255),
risposta_domanda1_b character varying(255),
risposta_domanda2_a character varying(255),
risposta_domanda2_b character varying(255),
risposta_domanda3 character varying(255),
risposta_domanda4 character varying(255),
risposta_domanda5_1 character varying(255),
risposta_domanda5_2 character varying(255),
risposta_domanda5_3 character varying(255),
risposta_domanda5_4 character varying(255),
risposta_domanda5_6 character varying(255),
risposta_domanda5_7 character varying(255),
risposta_domanda5_8 character varying(255),
risposta_domanda5_9 character varying(255),
risposta_domanda5_10 character varying(255),
risposta_domanda6_1 character varying(255),
risposta_domanda6_2 character varying(255),
risposta_domanda6_3 character varying(255),
risposta_domanda6_4 character varying(255),
risposta_domanda6_5 character varying(255),
risposta_domanda6_6 character varying(255),
risposta_domanda6_7 character varying(255),
risposta_domanda6_8 character varying(255),
risposta_domanda6_9 character varying(255),
risposta_domanda6_10 character varying(255),
risp_dom3_equiprob_1 character varying(255),
risp_dom3_equiprob_2 character varying(255),
risp_dom3_equiprob_3 character varying(255),
risp_dom3_equiprob_4 character varying(255),
risp_dom3_equiprob_5 character varying(255),
risp_dom3_equiprob_6 character varying(255),
risp_dom3_equiprob_7 character varying(255),
risp_dom3_equiprob_8 character varying(255),
risp_dom3_equiprob_9 character varying(255),
risp_dom3_equiprob_10 character varying(255),
risposta_domanda5_5 character varying(255),
CONSTRAINT outputrisposte_pkey PRIMARY KEY (id )
)
WITH (
OIDS=FALSE
);