MasoniteFramework / orm

Masonite ORM is a beautiful Python ORM. It's also a nearly drop in replacement of the Orator ORM
https://orm.masoniteproject.com
MIT License
165 stars 48 forks source link

Added new methods to builder (#748) #752

Closed maicol07 closed 2 years ago

maicol07 commented 2 years ago

The following methods have been implemented from #748:

josephmancuso commented 2 years ago

Just have to fix the tests

maicol07 commented 2 years ago

@josephmancuso should be fixed!

maicol07 commented 2 years ago

This time they're fixed for good!

josephmancuso commented 2 years ago

I don't see a test for the foreign_id_for one. Just need to make sure the model name and primary key is correctly formed.

More tests the better. Allows me to make changes with comfort

maicol07 commented 2 years ago

How can I create a Model in tests? Should I just have to create a new model instance?

josephmancuso commented 2 years ago

Yup just make a model as you normally would inside the test file and use it.

Example: https://github.com/MasoniteFramework/orm/blob/2.0/tests/mysql/relationships/test_belongs_to_many.py#L16-L23

maicol07 commented 2 years ago

@josephmancuso done!