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 J), 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 ? J 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 |
- SV: Abator wishlist erlend.bjorge
- SV: Abator wishlist erlend.bjorge
- Re: Abator wishlist Gareth Moorst