Closed GoogleCodeExporter closed 9 years ago
I do not believe such a method needs to be in the core framework. In my
experience this convenience method is not often used in most projects. Since
the DAOs are exstensible you can extend them to create your own base DAO that
adds this method if you find it useful.
When the search object comes into your method, you can modify it to set fields
to just "id". For example:
Search modifiedSearch = SearchUtil.shallowCopy(search);
modifiedSearch.setFields(Collections.singletonList(new Field("id")));
Original comment by dwolvert
on 22 Sep 2010 at 9:57
Yeah, you are right. In fact I forgot that you don't have the column name for
the ID, only the type. And so it's not so interesting to have it in the core
framework.
Original comment by cimballi...@gmail.com
on 22 Sep 2010 at 10:16
To make it even simpler, with Hibernate (and I believe JPA?), "id" will always
refer to the id column no matter what the actual column name.
Original comment by dwolvert
on 22 Sep 2010 at 10:28
Original issue reported on code.google.com by
cimballi...@gmail.com
on 22 Sep 2010 at 7:05