Permalink
Browse files

Note that every model must define a key to be valid

  • Loading branch information...
1 parent a33f4ee commit 05e742636e55b3f03e7daf2e59e455bedd77fd6c @snusnu snusnu committed Jan 10, 2011
Showing with 9 additions and 0 deletions.
  1. +9 −0 getting-started.markdown
View
@@ -104,6 +104,15 @@ constraints for your properties. DataMapper supports a lot of different
[property](/docs/properties) types natively, and more through
[dm-types](/docs/dm_more/types).
+An important thing to note is that every model *must* have a key in
+order to be valid. If a model has no key, there's no way to identify a
+resource and thus no way to update its persistent state within the
+backend datastore. DataMapper will raise a `DataMapper::IncompleteModelError`
+when trying to `auto_migrate!` a model that has no key declared.
+
+Have a look at [property](/docs/properties) to learn about the different
+ways of declaring keys for your models.
+
Associations
------------

0 comments on commit 05e7426

Please sign in to comment.