criteria.where(BookPeer.BOOK_ID, bookToSelect.getBookId());
criteria.addSelectColumn(BookPeer.BOOK_ID);
criteria.addSelectColumn(BookPeer.TITLE);
// use CompositeMapper to enforce offset
CompositeMapper recordMapper = new CompositeMapper();
recordMapper.addMapper(new BookRecordMapper(), 1);
List<List<Object>> books = BookPeer.doSelect(criteria, recordMapper);
assertEquals(1, books.size());
Book selectedBook = (Book) books.get(0).get(0);
assertEquals(0, selectedBook.getBookId());