class Account < RBatis::Base statement :select_value, :find_next_account_id, :result_type => Fixnum do "SELECT MAX(id) + 1 FROM accounts" end end