Created
August 22, 2008 01:27
-
-
Save markbates/6694 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Passport | |
include DataMapper::Resource | |
storage_names[:hls] = "tbl_pssptz" | |
property :id, Integer, :key => true | |
property :country_code, String, :nullable => false | |
property :expiration_date, Date, :nullable => false | |
repository(:hls) do | |
property :id, String, :size => 11, :key => true, :field => "pid" | |
property :person_id, Integer, :field => "peopleid" | |
property :country_code, Integer | |
property :expiration_date, Date, :field => "expdate" | |
end | |
end | |
#-- | |
repository(:hls) { puts Passport.all } | |
DEBUG: [2008-08-21 21:26:52] SELECT `id`, `country_code`, `expiration_date`, `id`, `person_id`, `country_code`, `expiration_date` FROM `tbl_pssptz` ORDER BY `id` | |
DEBUG: [2008-08-21 21:26:52] Unknown column 'id' in 'field list' (mysql_error_code=0001) | |
DEBUG: [2008-08-21 21:26:52] #<DataObjects::Mysql::Connection:0x2626784 @using_socket=false, @__allocated_in_pool=Thu Aug 21 21:26:52 -0400 2008, @concrete_command=DataObjects::Mysql::Command, @__pool=#<Extlib::Pooling::Pool<DataObjects::Mysql::Connection> available=0 reserved_count=1>, @connection=#<Object:0x2626658>, @uri=#<Addressable::URI:0x12628ce URI:mysql://root@localhost/hls_db>> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment