From 8083d63741f91a285cf433de0fe6b36a9140d91c Mon Sep 17 00:00:00 2001 From: Simon Holywell Date: Thu, 29 Nov 2012 14:40:14 +0000 Subject: Closes issue #85 Implement is_new() in Idiorm --- README.markdown | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'README.markdown') diff --git a/README.markdown b/README.markdown index 8aa1c7d..6a5af9e 100644 --- a/README.markdown +++ b/README.markdown @@ -27,8 +27,9 @@ Changelog #### 1.3.0 - release XXXX-XX-XX -* Add in raw_execute - closes issue 40 [[tag](https://github.com/tag)] +* Add in raw_execute - closes issue #40 [[tag](https://github.com/tag)] * Add query logging to `delete_many` [[tag](https://github.com/tag)] +* Add `is_new` method - closes issue #85 #### 1.2.1 - release 2012-11-15 @@ -484,6 +485,8 @@ To add a new record, you need to first create an "empty" object instance. You th After the object has been saved, you can call its `id()` method to find the autogenerated primary key value that the database assigned to it. +To determine if the instance you are operating on has been obtained by calling `create()` or whether it was via query on the database you can call `is_new()` on it to get a boolean response. + #### Properties containing expressions #### It is possible to set properties on the model that contain database expressions using the `set_expr` method. -- cgit v1.2.3