B-Sides / peacekeeper

Peacekeeper handles delegation to a variety of ORMs and separation of business logic from persistance logic
BSD 2-Clause "Simplified" License
1 stars 1 forks source link

specify options in db URI #3

Closed erubboli closed 12 years ago

erubboli commented 12 years ago

I want to specify an option in the database URI, for example: jdbc:mysql://localhost/myDatabase?zeroDateTimeBehavior=convertToNull

(ref: http://stackoverflow.com/questions/1363527/cannot-convert-0000-00-00-000000-to-timestamp )

jballanc commented 12 years ago

You should be able to specify DB connection options now by assigning the 'options' key of config to a hash containing the options like so:

Peacekeeper::Model.config['options'] = { zeroDateTimeBehavior: 'convertToNull' }