[eluser]WanWizard[/eluser]
If you use the save() method, UPDATE is used if
- the object property id exists and has a value
- you didn't call save_as_new()
In all other cases Datamapper uses INSERT.
Given the code example, my guess is that you didn't follow the design requirements as documented, which clearly states that the primary key of every datamapper table MUST be called 'id'.