sdispater / eloquent

The Eloquent ORM provides a simple yet beautiful ActiveRecord implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add actual ORM

sdispater opened this issue · comments

Eloquent should have an actual ORM to do things like:

users = User.all()

user = User.find(1)

users = User.where('votes', '>', 100).take(10).get()

user = User.find(1)
user.email = 'john@foo.com'
user.save()

user = User.create(name='foo', email='foo@bar.com')

What do you plan to model this after? Django's ORM and others which seemed to have followed suite in design/style?

I want Eloquent to follow the ActiveRecord pattern which provides less configuration and verbosity compared to the data mapper pattern which pretty much all of the Python ORMs follow.

I also want it to be really simple to read and right, with useful features out of the box (like timestampable models, soft deletes, protection against mass assigment, model events).

It basically comes from a personal need for simplicity when defining my models. It is one of the things that make me like Rails.

Sounds good. I like where all this is going tbqh :)