* @throws Exception if the test fails.
*/
public void testPartialSelectOffset() throws Exception
{
Criteria criteria = new Criteria();
Book bookToSelect = authorList.get(0).getBooks().get(0);
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());
assertEquals(bookToSelect.getTitle(), selectedBook.getTitle());
assertEquals(null, selectedBook.getIsbn());
assertEquals(0, selectedBook.getAuthorId());
}