db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Baird" <Matthew.Ba...@motiva.com>
Subject RE: WithMultiArgsConstructor
Date Thu, 30 Jan 2003 23:26:01 GMT
it's my opinion that any 'buildWithMultiArgsConstructor' is not safe if you want to support
multiple classes mapped to the same table with the current implementation. Not that it can't
be done, but it might require some changes bigger than just 'buildWithMultiArgsConstructor'.
Luckily there are a ton of test cases around that functionality now.

I am available to answer questions on that code if necessary.

-----Original Message-----
From: Richard Beauchamp [mailto:richard@rbeau.com]
Sent: Thursday, January 30, 2003 3:03 PM
To: 'OJB Developers List'
Subject: RE: WithMultiArgsConstructor

Hello all,

I know this is a reply to an old post, but I'm just now updating our
infrastructure from OJB 0.9 to 0.9.8 and noticed that the new
'buildWithMultiArgsConstructor' method signature is modified (i.e., declares
a Map rather than an Object[]) and is not used anymore.

Having a safe 'buildWithMultiArgsConstructor' (as in OJB 0.9) is extremely
important to our team because we declare some persistent object (po)
properties as 'final'. If the only means to create a po was via a no-arg
constructor + reflection (as in OJB 0.9.8) then we couldn't declare some po
properties as 'final' and our pos would therefore become less correct and
less safe.

I'll work on a safe 'buildWithMultiArgsConstructor' and post it to the OJB
dev list.



> From: Mahler Thomas thomas.mahler@itellium.com>
> Subject: AW: WithMultiArgsConstructor
> Date: Tue, 9 Jul 2002 17:17:25 +0200
> Hi,

> > -----Urspr√ľngliche Nachricht-----
> > Von: Matthew Baird [mailto:Matthew.Baird@motiva.com]
> > Gesendet: Montag, 8. Juli 2002 23:54
> > An: OJB Developers List
> > Betreff: RE: WithMultiArgsConstructor
> >
> >
> > I think I took out the buildWithMultiArgsConstructor
> > functionality as it is pretty dangerous. I left this function
> > in case anyone complained.
> >
> > I will remove it if no one minds.
> Please not remove it!
> I think we should reimplement the buildWithMultiArgsConstructor in a safe
> way.
> Using this constructor is much faster than setting the primitive type
> attributes one by one.
> cheers,
> Thomas

To unsubscribe, e-mail: ojb-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ojb-dev-help@jakarta.apache.org

View raw message