<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -2,125 +2,73 @@
 
 = FAQ
 
-=== I don't want to use :id as a primary key, but I don't see
-=== &lt;tt&gt;set_primary_key&lt;/tt&gt; anywhere. What do I do?
+=== So where's my :id column?
 
-If you're working with a table that doesn't have a &lt;tt&gt;:id&lt;/tt&gt; column, you
-can declare your properties as you usually do, and declare one of them as a
-natural key.
+DataMapper will NOT create an auto-incrementing &lt;tt&gt;:id&lt;/tt&gt; key for you 
+automatically, so you'll need to either explicitly create one with
 
-   property :name, String, :key =&gt; true
+  property :id, Fixnum, :serial =&gt; true
 
-You should now be able to do &lt;tt&gt;Class['name_string']&lt;/tt&gt; as well. Remember:
-this column should be unique, so treat it that way. This is the equivalent to
-using &lt;tt&gt;set_primary_key&lt;/tt&gt; in ActiveRecord.
+You can choose to use a natural key by doing
 
+  property :slug, String, :key =&gt; true
 
-=== How do I make a model paranoid?
-
-  property :deleted_at, DateTime
+Remember, DataMapper supports multiple keys (&quot;composite keys&quot;), so if your
+model has two or more keys, no big deal
 
-If you've got deleted_at, your model is paranoid auto-magically. All of your
-calls to &lt;tt&gt;##all()&lt;/tt&gt;, &lt;tt&gt;##first()&lt;/tt&gt;, and &lt;tt&gt;##count()&lt;/tt&gt; will be
-scoped with &lt;tt&gt;where deleted_at is null&lt;/tt&gt;. Plus, you won't see deleted
-objects in your associations.
+  property :store_id, 	Fixnum, :key =&gt; true
+  property :invoice_id, Fixnum, :key =&gt; true
 
-=== Does DataMapper support Has Many Through?
+=== How do I make a model paranoid?
 
-Write me!
+Create a property and make it a ParanoidDateTime or ParanoidBoolean type.
 
-=== What about Self-Referential Has And Belongs to Many?
+  property :deleted_at, ParanoidDateTime
+  property :deleted, ParanoidBoolean
 
-Sure does.  Here's an example implementation:
-
-  class Task
-    include DataMapper::Resource
-    many_to_many :tasks,
-      :join_table =&gt; &quot;task_relationships&quot;, :left_foreign_key =&gt; &quot;parent_id&quot;,
-      :right_foreign_key =&gt; &quot;child_id&quot;
-  end
-
-You'll notice that instead of &lt;tt&gt;foreign_key&lt;/tt&gt; and
-&lt;tt&gt;association_foreign_key&lt;/tt&gt;, DataMapper uses the &quot;database-y&quot; terms
-&lt;tt&gt;left_foreign_key&lt;/tt&gt;, and &lt;tt&gt;right_foreign_key&lt;/tt&gt;.
+All of your calls to &lt;tt&gt;##all()&lt;/tt&gt;, &lt;tt&gt;##first()&lt;/tt&gt; will be scoped 
+with &lt;tt&gt;:deleted_at =&gt; nil&lt;/tt&gt; or &lt;tt&gt;:deleted =&gt; false&lt;/tt&gt;. Plus, 
+you won't see deleted objects in your associations.
 
 === Does DataMapper do Single Table Inheritance?
 
-Oh yes, and particularly well too.
+This is what the Class data-type is for:
 
   class Person
     include DataMapper::Resource
+    property :id, Fixnum, :serial =&gt; true
     property :type, Class ## other shared properties here
   end
 
   class Salesperson &lt; Person; end
 
-You can claim a column to have the type &lt;tt&gt;:class&lt;/tt&gt; and DataMapper will
-automatically drop the class name of the inherited classes into that column of
-the database.
-
-=== What about Class Table Inheritance?
-
-Class Table Inheritance is on the drawing board and everyone's drooling over
-it. So no, not yet, but soon.
+You can claim a column to have the type &lt;tt&gt;Class&lt;/tt&gt; and DataMapper will
+automatically drop the class name of the inherited classes into that field of
+the data-store.
 
 === How do I run my own commands?
 
-You're probably asking for &lt;tt&gt;find_by_sql&lt;/tt&gt;, and DataMapper has that in
-it's ActiveRecordImpersonation, but if you want to go straight-up DataMapper,
-you'll want to use &lt;tt&gt;repository.query&lt;/tt&gt;
-
-  repository.query(&quot;select * from users where clue &gt; 0&quot;)
+  repository.adapter.query(&quot;select * from users where clue &gt; 0&quot;)
+  repository(:integration).adapter.query(&quot;select * from users where clue &gt; 0&quot;)
 
 This does not return any Users (har har), but rather Struct's that will quack
 like Users. They'll be read-only as well.
 
-&lt;tt&gt;repository.query&lt;/tt&gt; shouldn't be used if you aren't expecting a result set
+&lt;tt&gt;repository.adapter.query&lt;/tt&gt; shouldn't be used if you aren't expecting a result set
 back.  If you want to just execute something against the database, use
-&lt;tt&gt;repository.execute&lt;/tt&gt; instead.
-
-=== Can I batch-process a ton of records at once?
-
-  User.each(:performance_rating =&gt; &quot;low&quot;) do |u|
-    u.employment_status = &quot;fired&quot; 
-    u.save
-  end
+&lt;tt&gt;repository.adapter.execute&lt;/tt&gt; instead.
 
-With ActiveRecord, doing a &lt;tt&gt;User.find(:all).each{}&lt;/tt&gt; would execute the
-find, instantiate an object for EVERY result, THEN apply your transformations
-to each object in turn. Doesn't sound too horrible unless you have a TON of
-records; you WILL grind your system to a screeching and bloody halt.
 
-DataMapper's &lt;tt&gt;#each&lt;/tt&gt; works in sets of 500 so the amount of objects
-instantiated at a time won't make your computer think it's a victim in a Saw
-movie. Once it's done executing your block on the first set of 500, it moves
-on to the next.
+=== Can I get an query log of what DataMapper is issuing?
 
-What's more is &lt;tt&gt;#each&lt;/tt&gt; is secretly a finder too. You can pass it an
-options hash and it'll only iterate on 500-item sets matching your query.
-Don't send it &lt;tt&gt;:offset&lt;/tt&gt; though, because that's how it pages. You can
-overload the page size by sending it &lt;tt&gt;:limit&lt;/tt&gt;
+Yup, to set this up, do:
 
-=== Can I get an SQL log of what queries DataMapper is issuing?
-
-Yup, when you issue &lt;tt&gt;Repository.setup&lt;/tt&gt;, tack on the &lt;tt&gt;log_stream&lt;/tt&gt;
-and &lt;tt&gt;log_level&lt;/tt&gt;:
-
-  DataMapper::Repository.setup({
-   :adapter    =&gt; 'mysql', :host       =&gt; 'localhost', :username   =&gt; 'root',
-   :password   =&gt; 'R00tPaswooooord', :database   =&gt;
-   'myspiffyblog_development', :log_stream =&gt; 'log/sql.log', :log_level  =&gt; 0
-  })
-
-By supplying the &lt;tt&gt;log_stream&lt;/tt&gt; you're telling DataMapper what file you
-want to see your sql logs in. &lt;tt&gt;log_level&lt;/tt&gt; is the
-Logger[http://www.ruby-doc.org/stdlib/libdoc/logger/rdoc/] level of output you
-want to see there. 0, in this case, says that you want to see all DEBUG level
-messages (and higher) sent to the logger. For more information on how to work
-with Logger[http://www.ruby-doc.org/stdlib/libdoc/logger/rdoc/], hit up
-http://www.ruby-doc.org/stdlib/libdoc/logger/rdoc/.
+  DataMapper.logger = Logger.new(&quot;/path/to/your/logger.log&quot;, &quot;w+&quot;)
 
 Incidentally, if you'd like to send a message into the DataMapper logger, do:
 
-  repository.adapter.logger.info &quot;your message here&quot;
-
+  DataMapper.logger.debug { &quot;something&quot; }
+  DataMapper.logger.info { &quot;something&quot; }
+  DataMapper.logger.warn { &quot;something&quot; }
+  DataMapper.logger.error { &quot;something&quot; }
+  DataMapper.logger.fatal { &quot;something&quot; }</diff>
      <filename>FAQ</filename>
    </modified>
    <modified>
      <diff>@@ -16,7 +16,7 @@ for commit rights. It's as easy as that to become a contributor.
 
 == Identity Map
 
-One row in the database should equal one object reference. Pretty simple idea.
+One row in the data-store should equal one object reference. Pretty simple idea.
 Pretty profound impact. If you run the following code in ActiveRecord you'll
 see all &lt;tt&gt;false&lt;/tt&gt; results. Do the same in DataMapper and it's
 &lt;tt&gt;true&lt;/tt&gt; all the way down.
@@ -31,13 +31,13 @@ This makes DataMapper faster and allocate less resources to get things done.
 
 == Don't Do What You Don't Have To
 
-ActiveRecord updates every column in a row during a save whether that column
+ActiveRecord updates every field in a row during a save whether that field
 changed or not. So it performs work it doesn't really need to making it much
 slower, and more likely to eat data during concurrent access if you don't go
 around adding locking support to everything.
 
 DataMapper only does what it needs to. So it plays well with others. You can
-use it in an Integration Database without worrying that your application will
+use it in an Integration data-store without worrying that your application will
 be a bad actor causing trouble for all of your other processes.
 
 == Eager Loading
@@ -58,23 +58,23 @@ your finders.
 
 == Laziness Can Be A Virtue
 
-Text columns are expensive in databases. They're generally stored in a
+Text fields are expensive in data-stores. They're generally stored in a
 different place than the rest of your data. So instead of a fast sequential
-read from your hard-drive, your database server has to hop around all over the
+read from your hard-drive, your data-store server has to hop around all over the
 place to get what it needs. Since ActiveRecord returns everything by default,
-adding a text column to a table slows everything down drastically, across the
+adding a text field to a table slows everything down drastically, across the
 board.
 
 Not so with the DataMapper. Text fields are treated like in-row associations
 by default, meaning they only load when you need them. If you want more
-control you can enable or disable this feature for any column (not just
-text-fields) by passing a @lazy@ option to your column mapping with a value of
+control you can enable or disable this feature for any field (not just
+text-fields) by passing a @lazy@ option to your field mapping with a value of
 &lt;tt&gt;true&lt;/tt&gt; or &lt;tt&gt;false&lt;/tt&gt;.
 
   class Animal
     include DataMapper::Resource
     property :name, String
-    property :notes, DataMapper::Types::Text, :lazy =&gt; false
+    property :notes, Text, :lazy =&gt; false
   end
 
 Plus, lazy-loading of text fields happens automatically and intelligently when
@@ -88,22 +88,22 @@ of the notes fields on each animal:
 
 == Plays Well With Others
 
-In ActiveRecord, all your columns are mapped, whether you want them or not.
+In ActiveRecord, all your fields are mapped, whether you want them or not.
 This slows things down. In the DataMapper you define your mappings in your
-model. So instead of an _ALTER TABLE ADD COLUMN_ in your Database, you simply
+model. So instead of an _ALTER TABLE ADD field_ in your data-store, you simply
 add a &lt;tt&gt;property :name, :string&lt;/tt&gt; to your model. DRY. No schema.rb. No
 migration files to conflict or die without reverting changes. Your model
-drives the database, not the other way around.
+drives the data-store, not the other way around.
 
-Unless of course you want to map to a legacy database. Raise your hand if you
+Unless of course you want to map to a legacy data-store. Raise your hand if you
 like seeing a method called &lt;tt&gt;col2Name&lt;/tt&gt; on your model just because
-that's what it's called in an old database you can't afford to change right
+that's what it's called in an old data-store you can't afford to change right
 now? In DataMapper you control the mappings:
 
   class Fruit
     include DataMapper::Resource
     storage_names[:repo] = 'frt'
-    property :name, String, :column =&gt; 'col2Name'
+    property :name, String, :field =&gt; 'col2Name'
   end
 
 == All Ruby, All The Time
@@ -111,7 +111,7 @@ now? In DataMapper you control the mappings:
 It's great that ActiveRecord allows you to write SQL when you need to, but
 should we have to so often?
 
-DataMapper supports issuing your own SQL, but it also provides more helpers
+DataMapper supports issuing your own query, but it also provides more helpers
 and a unique hash-based condition syntax to cover more of the use-cases where
 issuing your own SQL would have been the only way to go. For example, any
 finder option that's non-standard is considered a condition. So you can write
@@ -143,10 +143,3 @@ need other comparisons though? Try these:
 
 See? Fewer SQL fragments dirtying your Ruby code. And that's just a few of the
 nice syntax tweaks DataMapper delivers out of the box...
-
-== Better Is Great, But Familiar Is Nice
-
-The DataMapper also supports a lot of old-fashioned ActiveRecord syntax. We
-want to make it easy for you to get started, so aside from mapping your
-columns and changing the base-class your models inherit from, much of AR
-syntax for finders are supported as well, making your transition easy.</diff>
      <filename>README</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d18d2d5d4a8feba60d4e59a1c9683542831ae1bb</id>
    </parent>
  </parents>
  <author>
    <name>Adam French</name>
    <email>adam@adam.wieck.com</email>
  </author>
  <url>http://github.com/sam/dm-core/commit/63410587d913b3a749316d07f9d3fde1234d32fb</url>
  <id>63410587d913b3a749316d07f9d3fde1234d32fb</id>
  <committed-date>2008-05-08T09:07:38-07:00</committed-date>
  <authored-date>2008-05-08T09:07:38-07:00</authored-date>
  <message>rewriting docs for dm-point-nine</message>
  <tree>ad60abdc5a287d16abfdb8ff2c25d21285f5bec5</tree>
  <committer>
    <name>Adam French</name>
    <email>adam@adam.wieck.com</email>
  </committer>
</commit>
