ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <erlend.bjo...@aftenposten.no>
Subject SV: Abator wishlist
Date Fri, 23 Jun 2006 17:18:17 GMT
Hi there Jeff!

 

>The primary key class is seperated so that the method signatures for selectByPrimaryKey
and deleteByPrimaryKey can only require the primary key, and not the class that represents
the entire row.  

 

I see, was thinking about that, but I haven't got that problem, I always have like this fetchObjectById(Integer
id), deleteObjectById(Integer key1, Integer key2). Shouldn't that be a better way ? 

If you need an update.. you have to have the data too, so what do you do then ? update(pk,
bean) ?

 

>I did it that way because I have strong dislike of using half empty objects.  

 

Yes I see that problem (we have it :-)), but that's not related to select, delete methods
where you only need the PK as an parameter, as we do it.

 

>For example, if the deleteByPrimaryKey method took the entire row as a parameter, everyone
would have to remember what fields are in the primary key and only set those fields - yuck.
 

 

Yes, I'm agree, but why "create" and "hole" primaryKey object, instead of just sending in
the PK itself as an parameter ? :-) But I guess this is related to the nature of how Abator
works behind the scene ?

 

 

Thanks for the answers anyway!

 

Cheers,

Erlend Bjørge


Mime
View raw message