spadefoot / kohana-orm-leap

An ORM module for the Kohana PHP framework that is designed to work with all major databases.
http://spadefoot.github.io/kohana-orm-leap/
100 stars 25 forks source link

separate "create" and "update" functions instead of "save" #62

Closed taai closed 12 years ago

taai commented 12 years ago

It's great that there is the save() function that automatically understands what to do - create or update. But it is not possible to create a new record, when providing also a primary key (id). For example, I would set the "id" manually - Leap would think that I'm willing to update, not create.

So, there needs to be a separate create() and update() functions, and the save() as a automatic save/update function caller.

bluesnowman commented 12 years ago

Yeah, this sound like a good idea. I can definitely see a use for these functions. I will see what we can do to make this happen.

taai commented 12 years ago

I have already written the code to make this happen. Actually I have done alot of modifications... It would be easyer for me to have a little chat so I can tell all about what I have done...