Date: Tue, 09 Aug 2011 18:56:17 +1000 From: Lionel User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110621 Mandriva/3.1.11-0.1mdv2010.2 (2010.2) Thunderbird/3.1.11 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: Hibernate foreign key as primary key References: <4e3e78a1@dnews.tpgi.com.au> <9a7tq6FspmU1@mid.individual.net> <9a7vglFa7hU1@mid.individual.net> <4e3fb5d8@dnews.tpgi.com.au> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 60.241.47.75 X-Original-NNTP-Posting-Host: 60.241.47.75 Message-ID: <4e40f5a1@dnews.tpgi.com.au> X-Trace: dnews.tpgi.com.au!tpg.com.au 1312880033 60.241.47.75 (9 Aug 2011 18:53:53 +1000) Lines: 52 Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!usenet.hanse.com!nntp.gblx.net!nntp3.phx1!dnews.tpgi.com.au!tpg.com.au!not-for-mail Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:6902 On 09/08/11 07:26, Arved Sandstrom wrote: > On 11-08-08 07:11 AM, Lionel wrote: > [ SNIP ] > >> I thought there might be more knowledge of hibernate on this forum, but >> based on the responses it seems it is too specific for this forum. I >> just wasn't getting responses to other questions on the Hibernate forum >> (and neither were many other people though there are a high number of >> posts) so I decided to try on my preferred medium :). >> >> Thanks everyone for your input. >> >> Lionel. > > It's one thing if you're not getting Hibernate-specific answers here; > it's something else entirely if you (and a bunch of other folks) are not > getting answers on Hibernate forums. > > A suggestion I have is to consider the use of JPA. If you're happy with > Hibernate keep it as a JPA provider, but stick with the JPA 2 > specification, and use annotations. XML configuration files are better > than straight text configuration files, by a long shot, but they are in > turn inferior to annotations; JPA radically cuts down on XML. > > The advantage of sticking with JPA is that it's the overall Java > persistence specification. You're no longer tied to a specific ORM. > There's also likely more people and more forums that can answer JPA > questions...including here. I stopped wasting my time with > Hibernate/Toplink mapping XML as soon as JPA 1.0 appeared. I had wondered about JPA as I was starting with Hibernate. But I'm hesitant to back-pedal as this is a project with limited funding. I actually prefer the XML mapping approach, the annotations add a lot of noise to what can otherwise be a clean model. It may be personal preference but I like the separation. Does JPA provide the same features as Hibernate? Can you easily configure any DBMS? Does it manage objects like Hibernate? Of course I'm about to do a little more of my own research right now but I would like to hear from someone who has actually used it. > To return to my original point: tepid or no response on > Hibernate-specific forums. Cause for concern, that. Yeah, I'm not sure the exact reason, I will be trying again and paying very careful attention to the details of my post to make sure it is understandable. Thanks Lionel.