xavierlacot / joli.js

joli.js is an Activerecord-like javascript ORM, particularly suited for being used in the Appcelerator Titanium Mobile framework.
MIT License
267 stars 60 forks source link

Return the inserted id? #26

Open seabannan opened 12 years ago

seabannan commented 12 years ago

How do you return the inserted id when using the newRecord function

var record = model.newRecord({
        description: data.description,
        type: data.type,
        userEntered: data.userEntered
});

Ti.API.info(record);

record.save();

How can i get the id of the newly inserted row

thanks

easy-dev commented 12 years ago

did you check record.id ?

seabannan commented 12 years ago

hi yes thanks for this working now ;)