seems to me you just dont grasp how the mappings work. eg if you use a
@OneToMany with mappedby and let the other side control the
association then nothing is automatically inserted or deleted.
further, even if you do not use mappedby then nothing is deleted
unless you declare the delete orphan cascade.

the problem here is that List is a specific type of collection where
each element is uniquely identified by its index. that is just the
nature of lists and has nothing to do with hibenrate. this generally
does not map nicely to database collections unless you actually have
an index column in your table, so lists are rarely used when dealing
with databases...

i will agree with you as far as hibernate's horrible error reporting,
but other then that i find it a good tool and do not see many cases
where the abstraction leaks into actual coding style. some concepts
are very leaky, such as lazy loading, but that cant really be helped.

-igor

On Wed, Oct 22, 2008 at 11:56 PM, Wayne Pope
<[EMAIL PROTECTED]> wrote:
> well I'm new to Hibernate, and it seems that you must be extremely consious
> of how hibernate handles mapping etc. This may also be the same with other
> object to relational frameworks. An example is the the behaviour of
> OneToMany mappings using List as this uses "bag sematics". Hibernate's
> handling of these relationships is somewhat brute force i.e. it deletes
> existing entries and re-inserts to match the current collection and
> therefore you need to use Set's or use collectionid to create an idbag.
> Therefore straight away I can't use a List (which is all I need) in the
> code.
>
> There seems (to me) many many gotchas with Hibernate that you need to be
> aware of and the error messages don't tell you much compare to say Wicket.
>
> I come from a world where we used stored proceedures before and you simply
> provided the straight mapping from the result columns to your pojos. This
> was very flexible as you could change your pojos with no impact to the db
> structure and vice-versa we could completly change the db schema (for
> performance or any reason) with no impact on the code. This seems to work
> well.
>
> On Thu, Oct 23, 2008 at 8:36 AM, Igor Vaynberg <[EMAIL PROTECTED]>wrote:
>
>> im curious in what way does it influence java code...
>>
>> -igor
>>
>> On Wed, Oct 22, 2008 at 10:59 PM, Wayne Pope
>> <[EMAIL PROTECTED]> wrote:
>> > Nino what do you recommend in terms orf DB framework. We're currently
>> using
>> > Hibernate and I'm personally finding it a pain - it seems to influence
>> the
>> > java code way too much and it create some horrible joins if we're not
>> > carefull. Any suggestions that you've used in the real world?
>> >
>> > On Fri, Oct 17, 2008 at 8:15 PM, Nino Saturnino Martinez Vazquez Wael <
>> > [EMAIL PROTECTED]> wrote:
>> >
>> >> This is interesting:
>> >>
>> >> (JaQu) Provide API level compatibility with JPA (so that JaQu can be
>> used
>> >> as an extension of JPA).
>> >>
>> >> But I think something similar are on its way for JPA 2.0..?
>> >>
>> >>
>> >> marco.behler wrote:
>> >>
>> >>> I gave empireDB a quick look a while ago and it looks interesting.
>> Besides
>> >>> JPersist I also stumbled upon JaQu
>> >>> (http://www.h2database.com/html/jaqu.html), which is still in its
>> >>> infancy.
>> >>> I'm sure there's more LINQ-like clones out there.
>> >>>
>> >>> As far as I'm concerned, I'd really like to have a thorough look at
>> stuff
>> >>> like db4o or couchDB, especially performance wise. I did
>> Hibernate/iBatis
>> >>> in
>> >>> the past and am currently working on a project with iBatis again. Both
>> >>> have
>> >>> advantages and disadvantages and I don't "love" either. I would rather
>> not
>> >>> have to care about tables, objects,the mighty mismatch (and in
>> Hibernate's
>> >>> case the mighty session) anymore, but just shove that damn thing into
>> an
>> >>> object database ;)
>> >>>
>> >>> *hides from enraged DBAs and their optimised queries*
>> >>>
>> >>>
>> >>>
>> >>> Nino.Martinez wrote:
>> >>>
>> >>>
>> >>>> Yeah seems to be nice...
>> >>>>
>> >>>> At WUG DK we discussed. That if using stuff like hibernate, for simple
>> >>>> cruds it's nice but if you have a complex object graph it becomes very
>> >>>> troublesome to use (if you use cascade all etc.)..
>> >>>>
>> >>>> Ames, Tim wrote:
>> >>>>
>> >>>>
>> >>>>> Looks like it has a lot in common with JPersist.  That is what I have
>> >>>>> been using. No XML, all POJO.
>> >>>>>
>> >>>>> -----Original Message-----
>> >>>>> From: Nino Saturnino Martinez Vazquez Wael
>> >>>>> [mailto:[EMAIL PROTECTED]
>> >>>>> Sent: Thursday, October 16, 2008 11:28 AM
>> >>>>> To: users@wicket.apache.org
>> >>>>> Subject: have anyone tried empire-DB?
>> >>>>>
>> >>>>> So have you tried it with wicket?
>> >>>>>
>> >>>>> http://incubator.apache.org/empire-db/
>> >>>>>
>> >>>>> --
>> >>>>> -Wicket for love
>> >>>>>
>> >>>>> Nino Martinez Wael
>> >>>>> Java Specialist @ Jayway DK
>> >>>>> http://www.jayway.dk
>> >>>>> +45 2936 7684
>> >>>>>
>> >>>>>
>> >>>>> ---------------------------------------------------------------------
>> >>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>>>>
>> >>>>> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>> _
>> >>>>> _
>> >>>>> _
>> >>>>>
>> >>>>> EMAIL CONFIDENTIALITY NOTICE
>> >>>>> This Email message, and any attachments, may contain confidential
>> >>>>> patient health information that is legally protected. This
>> information is
>> >>>>> intended only for the use of the individual or entity named above.
>> The
>> >>>>> authorized recipient of this information is prohibited from
>> >>>>> disclosing this information to any other party unless required to do
>> so
>> >>>>> by law or regulation and is required to destroy the information after
>> its
>> >>>>> stated need has been fulfilled. If you are not the intended
>> recipient, you
>> >>>>> are hereby notified that any disclosure, copying, distribution, or
>> action
>> >>>>> taken in reliance on the contents of this message is strictly
>> prohibited.
>> >>>>> If you have received this information in error, please notify the
>> sender
>> >>>>> immediately by replying to this message and delete the message from
>> your
>> >>>>> system.
>> >>>>>
>> >>>>>
>> >>>>> ---------------------------------------------------------------------
>> >>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>> --
>> >>>> -Wicket for love
>> >>>>
>> >>>> Nino Martinez Wael
>> >>>> Java Specialist @ Jayway DK
>> >>>> http://www.jayway.dk
>> >>>> +45 2936 7684
>> >>>>
>> >>>>
>> >>>> ---------------------------------------------------------------------
>> >>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >>>> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>
>> >>>
>> >>>
>> >>
>> >> --
>> >> -Wicket for love
>> >>
>> >> Nino Martinez Wael
>> >> Java Specialist @ Jayway DK
>> >> http://www.jayway.dk
>> >> +45 2936 7684
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to