Re: Does anyone use postgreSQL(windows version)+Hibernate with middlegen?

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: rolandpeng <rolandpeng(at)cht(dot)com(dot)tw>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Does anyone use postgreSQL(windows version)+Hibernate with middlegen?
Date: 2009-04-17 04:09:00
Message-ID: 49E800DC.7080109@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

rolandpeng wrote:
> Yes,I'm totally agree about this comments.
> But as you're mentioned,I'd like to build all the hbm.xml at first run.
> I have built more than 40 tables with complicated relations among those.
> So if middlegen could help me to complete the template work at first
> generation would be very convenience.

NetBeans does fairly decent schema generation, at least for JPA. I'm not
too sure whether it supports XML-based schema definitions too.

Personally, I look at the XML-based hibernate stuff and shudder. JPA
isn't exactly beautiful, but it's fairly maintainable and kind of clean.
If you're building a new project, have you considered using JPA and
Hibernate EntityManager? You can always drop back down to the underlying
Hibernate APIs when you need to (for example: setting parent/child
autodelete relationships, which aren't defined in JPA 1 only in the
yet-to-be-availible JPA2) and most of the time EntityManager is very
nice to work with. You still use HQL, or native SQL queries as/when you
prefer.

--
Craig Ringer

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-04-17 05:04:48 Re: Full text search strategy for names
Previous Message kabindra 2009-04-17 04:05:41 pgadmin 1.8.4 gives error while backing up