Commit Graph

53 Commits

Author SHA1 Message Date
Jesse O'Brien
1be274caa6 Change update function so it uses timestamp like save
Calling update() on an eloquent model has no way of overriding
the timestamp that should be set if $timestamps is set on the
model. This changes that so it uses the timestamp() function
which is an easy way to over ride the type of timestamps used.
2012-07-04 15:46:12 -04:00
Jelle Sebreghts
ac8bd0829e Fix for https://github.com/laravel/laravel/issues/789 2012-06-11 20:00:46 +02:00
Jason Lewis
6d5239bf30 Missed a semi-colon.
Signed-off-by: Jason Lewis <jason.lewis1991@gmail.com>
2012-06-03 19:47:44 +09:30
Jason Lewis
b4db0f1b36 Small change moving array to a variable.
Signed-off-by: Jason Lewis <jason.lewis1991@gmail.com>
2012-06-03 19:45:49 +09:30
Jason Lewis
ab2fcb84ef Possible fix for issue #378.
Signed-off-by: Jason Lewis <jason.lewis1991@gmail.com>
2012-06-03 19:23:35 +09:30
Taylor Otwell
691d68ba54 improve / fix postgres support. 2012-05-30 14:23:27 -05:00
Taylor Otwell
b097b6c682 Fix to_array() in eloquent model. 2012-05-11 13:22:04 -05:00
Taylor Otwell
86fce099b3 Fixed belongs_to primary key bug. 2012-04-26 11:25:47 -05:00
Taylor Otwell
ca06582369 Add some events to Eloquent models. 2012-04-26 09:30:34 -05:00
Mark Huot
49384514ef The __get() magic method runs three checks before giving up but the __isset() method only runs two checks. This syncs the logic to ensure that __get() and __isset() are looking at the same possibilities. 2012-04-13 10:20:34 -03:00
Taylor Otwell
1847a369fb fixed eloquent datetime bug when determining dirty attributes. 2012-04-11 16:08:15 -05:00
Taylor Otwell
94b8582865 Add DateTime support to database binding layer.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
2012-04-10 15:03:42 -05:00
Taylor Otwell
fda19731c5 Fixing update handling in Has_Many and Has_One relationships.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
2012-04-10 11:26:03 -05:00
Taylor Otwell
1a5d4250d1 fix conflicts. 2012-04-10 10:10:31 -05:00
Joe Wallace
f7aee0ca2a Model::table() uses class_basename() helper - which properly discards namespaces on *nix systems
Signed-off-by: Joe Wallace <joew@atiba.com>
2012-04-09 11:28:40 -05:00
Taylor Otwell
eda46a815e fix eloquent model attribute resolution. 2012-04-04 10:33:24 -05:00
Taylor Otwell
369ecd80f7 Merge branch 'staging' into develop 2012-03-30 08:45:16 -05:00
Taylor Otwell
636d05665c fix merge conflicts. 2012-03-30 08:44:23 -05:00
Taylor Otwell
75f6384767 fix eloquent->delete bug. 2012-03-30 08:41:52 -05:00
Taylor Otwell
144117c0a1 cleaning up the eloquent model class. 2012-03-29 16:58:08 -05:00
Taylor Otwell
17cabd47e6 Added to_array() and $hidden variable to the Eloquent base model.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
2012-03-29 14:12:03 -05:00
Taylor Otwell
ba4d1a89c8 Removed add_ magic method from eloquent model as this will be a 3.2 feature. 2012-03-26 10:56:42 -05:00
Taylor Otwell
b6615ddbee Fixing a few things in Eloquent 2. 2012-03-22 11:00:13 -05:00
Taylor Otwell
268e6e460d Updating $eloquent->dirty() method. 2012-03-22 09:18:11 -05:00
Taylor Otwell
bb2f458304 Added "add_" magic method to eloquent model. 2012-03-21 14:23:46 -05:00
Taylor Otwell
43212f8505 Fix bug in eloquent model. 2012-03-21 10:38:39 -05:00
Taylor Otwell
4336bb885a Fix attribute retrieval bug in Eq2. 2012-03-20 11:43:11 -05:00
Taylor Otwell
e540fd3b6d Automatically detect eloquent table names. 2012-03-19 14:11:11 -05:00
Taylor Otwell
d80730cf0d Removed transaction method from Eloquent model since it is made pointless by DB::transaction. 2012-03-19 08:43:07 -05:00
Taylor Otwell
0455438ebe Added transaction method to database connection and eloquent model. 2012-03-18 22:39:04 -05:00
Taylor Otwell
fcff36a0ac Added related model updating from belongs_to relationship. 2012-03-17 23:14:01 -05:00
Taylor Otwell
762f2402c3 Fixing bugs and improving.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
2012-03-16 15:32:26 -05:00
Taylor Otwell
b5e75f6fcf Fixing bugs and improving.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
2012-03-16 14:08:28 -05:00
Taylor Otwell
dc92dd264d Adding auto detection of intermediate table names.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
2012-03-16 13:01:48 -05:00
Taylor Otwell
c3d95122e4 Fixing bugs… adding better pivot support.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
2012-03-16 11:29:21 -05:00
Taylor Otwell
c9c0ddf569 Fixing bugs in Eq2.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
2012-03-16 10:29:43 -05:00
Taylor Otwell
d6d667af90 Added Eloquent 2.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
2012-03-16 08:37:31 -05:00
Taylor Otwell
b5442c67fc merged skunkworks into develop. 2012-01-16 13:59:24 -06:00
Aaron Kuzemchak
81992a18fd Changed timestamp method to protected, so that it can be extended if desired. 2011-12-18 16:14:26 -05:00
Taylor Otwell
2b93963f34 removed unnecessary namespace import from eloquent model. 2011-10-15 14:19:33 -05:00
Taylor Otwell
a6eaa06981 refactoring routing and comments. 2011-10-15 14:04:11 -05:00
Taylor Otwell
9f7ed576c5 allow eloquent models to use increment and decrement. 2011-10-12 21:35:23 -05:00
Taylor Otwell
71b0ab8b8d refactoring container for speed. 2011-10-05 18:32:48 -05:00
Taylor Otwell
16575246af bug fixes. 2011-10-02 22:44:36 -05:00
Taylor Otwell
7018b85b4a cleaning up eloquent models. 2011-09-28 22:47:24 -05:00
Taylor Otwell
2ac5a37291 cleaning up eloquent models. 2011-09-28 22:47:05 -05:00
Taylor Otwell
c6f9734603 refactoring. 2011-09-27 21:10:32 -05:00
Taylor Otwell
5196d015b8 fixed merge conflicts. 2011-09-14 20:58:27 -05:00
Taylor Otwell
c576c388b9 added support for sequence to eloquent models. 2011-09-14 00:15:05 -05:00
Taylor Otwell
8688270f22 fixed database bugs. 2011-09-13 23:47:38 -05:00