Documents are first class citizens in MarkMapper. Out of the box you can persist them to collections and they can be related to other documents or embedded documents. They also come with all the typical dressings, such as associations, callbacks, serialization, validations, and rich querying.
class Article
  include MarkMapper::Document
  key :title,        String
  key :content,      String
  key :published_at, Time
  timestamps!
endYou override the MarkLogic connection or collection name for a model:
class MyModel
  include MarkMapper::Document
  connection MarkLogic::MarkLogicClient.new('localhost', 27017)
  set_database_name "my_database"
end
    
    
    
//