0

I have created my tables and relationships in the database PostgreSQL, but when I want to generate Hibernate Mapping Files and POJOs, they are not generated

I applied all the appropriate steps to hibernate.cfg.xml generation and hibernate.reveng.xml

I think it's because the name tables and fields that I have in all uppercase, because I tested with another BD with the names of the tables in lower case and if it works normally, I show the script of my tables.

CREATE TABLE "public"."T_LNEA"(
 "ID_LNEA" Integer NOT NULL,
 "ID_CTGRIA" Integer NOT NULL,
 "DSCRPCION" Character varying(200)
)
WITH (OIDS=FALSE)
;

ALTER TABLE "public"."T_LNEA" ADD CONSTRAINT "PK_ID_LNEA" PRIMARY KEY ("ID_LNEA")
;

CREATE TABLE "public"."T_SUB_LNEA"(
 "ID_SUB_LNEA" Integer NOT NULL,
 "ID_LNEA" Integer NOT NULL,
 "DSCRPCION" Character varying(200)
)
WITH (OIDS=FALSE)
;

-- Add keys for table public.T_SUB_LNEA

ALTER TABLE "public"."T_SUB_LNEA" ADD CONSTRAINT "PK_ID_SUB_LNEA" PRIMARY KEY ("ID_SUB_LNEA")
;

CREATE TABLE "public"."T_CTGRIA"(
 "ID_CTGRIA" Integer NOT NULL,
 "DSCRPCION" Character varying(200)
)
WITH (OIDS=FALSE)
;

ALTER TABLE "public"."T_CTGRIA" ADD CONSTRAINT "PK_ID_CRITERIA" PRIMARY KEY ("ID_CTGRIA")
;

And an image that is loading the tables using the JBOS Tools.

http://www.subirimagenes.net/i/140725043241974386.png

But still I need support because I can not generate the POJOs. I've also tried with netbeans and does not generate anything.

4
  • They'll not be generated automatically, you have to do that part. Commented Jul 25, 2014 at 14:29
  • Then friend no other way to generate such offal, perhaps with another tool ? Commented Jul 25, 2014 at 14:40
  • Perhaps write some code to generate code. Commented Jul 25, 2014 at 14:41
  • possible duplicate of I can not generate Hibernate Mapping Files and POJOs from Database PostgreSQL? Commented Jul 25, 2014 at 15: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.