Commit Graph

373 Commits

Author SHA1 Message Date
Pavel Puchkin
3a46721eca Even more fluent eloquent model via magic setters
Now it is possible to use Eloquent's magic setters in chains. For example:

    $model->set_foo('foo')->take(10)->set_bar(some_function());
    // ...even though setters 'foo' and 'bar' are not defined on the model
2013-05-08 18:28:22 +11:00
Taylor Otwell
4ecbef68a0 Merge pull request #1853 from cviebrock/table-macros
Add Macros to tables
2013-04-04 10:41:39 -07:00
Bernardo Rittmeyer
d46e19214b get_dirty() comparison is not type safe
get_dirty() must compare using Not Identical (!==) on place of Not Equal (!=).
For example, changing null to false don't make the model dirty.
2013-04-04 12:50:59 +03:00
Colin Viebrock
906d0d851e add macros to tables 2013-04-03 18:26:15 -05:00
Taylor Otwell
7888309502 Merge pull request #1663 from neoascetic/anbu_fix
Fix bug in ANBU that cause wrong total time showing on SQL tab
2013-03-28 14:53:50 -07:00
Taylor Otwell
3f803d4eb3 Merge pull request #1719 from neoascetic/fix_custom_grammar
One more fix about custom query grammar
2013-03-28 14:23:47 -07:00
Alex
7a289ac50a Fix for Postgresql PDO::FETCH_ASSOC 2013-03-21 23:13:51 -05:00
Pavel Puchkin
9003957b28 One more fix about custom query grammar 2013-02-18 15:18:10 +11:00
Pavel Puchkin
a2cafaa367 Fix bug in ANBU that cause wrong total time showing on Queries tab
When query time is larger than one second 'array_sum' cannot convert it
to float right. Also, it is better to fire 'laravel.query' event with
raw time as an argument rather than its string representation
2013-02-01 11:10:02 +11:00
Taylor Otwell
53b94468cd Fix multi inserts in SQLite. 2013-01-06 19:06:53 -06:00
Taylor Otwell
b0eb9a8b42 Fix bugs in Eloquent. 2013-01-05 16:45:34 -06:00
Taylor Otwell
23bdbd0834 Tweak postgres connector. 2013-01-05 16:22:32 -06:00
Taylor Otwell
cc0908cddc Merge branch 'master' into develop 2013-01-05 16:07:59 -06:00
Taylor Otwell
5fd1ea527f Fix bug in connection with custom grammars. 2013-01-05 16:00:32 -06:00
Taylor Otwell
13a1c5daac Merge pull request #1170 from kapv89/patch-4
Added a method to fluently set belongs-to relation
2013-01-05 13:51:39 -08:00
Taylor Otwell
c397c26a7b Merge pull request #1221 from arisk/patch-1
Added PDO error code
2013-01-05 13:33:51 -08:00
Taylor Otwell
05cb1ea5ad Merge pull request #1234 from ROMOPAT/patch-1
add use Closure;
2013-01-05 13:24:45 -08:00
Taylor Otwell
e7ae316e44 Merge pull request #1235 from ROMOPAT/patch-2
Undefined namespace Grammars
2013-01-05 13:23:47 -08:00
Taylor Otwell
b5e5494144 Merge pull request #1410 from franzliedke/patch-56
Make insert_get_id() work with non-auto-incrementing columns.
2013-01-05 12:41:39 -08:00
Taylor Otwell
f785cb22c9 Merge pull request #1428 from dejangeci/feature/dbtransaction-return
Added return value from PDO::commit
2013-01-05 12:33:17 -08:00
Taylor Otwell
10b8732583 Merge pull request #1434 from franzliedke/patch-59
My take at #1198
2013-01-05 12:28:00 -08:00
Taylor Otwell
e8cd58a9bc Merge pull request #1444 from eddmann/bug/database-connector
Fixed connector options merge bug.
2013-01-05 12:17:11 -08:00
Taylor Otwell
eb5d68f201 Merge pull request #1531 from jasonlewis/eloquent/bug/find
Allow find to be called anywhere on an Eloquent Model
2013-01-05 11:43:11 -08:00
Taylor Otwell
082fc0b39b Merge pull request #1533 from JoostK/relationship-with
Added ability to call Eloquent::with on a Relationship instance
2013-01-05 11:42:08 -08:00
Taylor Otwell
7b846be4c4 Allow multiple schemas in pgsql. 2013-01-05 13:15:59 -06:00
Taylor Otwell
cc9929e578 Merge branch 'master' into develop 2013-01-05 13:08:33 -06:00
David Staley
4cea38e0b3 Added in a new method for checking pdo drivers
Added in a more dynamic method for checking whether to use dblib or
sqlsrv drivers for a mssql pdo connection. This is to make local mac
devs work well with windows prod machines.
2013-01-02 10:44:20 -07:00
JoostK
fd1b76a296 Added ability to call Eloquent::with on a Relationship instance
Signed-off-by: JoostK <joost.koehoorn@gmail.com>
2012-12-18 16:21:06 +01:00
Jason Lewis
a422e06989 Find no longer needs to be defined on the model since the query catches it correctly.
Signed-off-by: Jason Lewis <jason.lewis1991@gmail.com>
2012-12-18 19:21:05 +11:00
Jason Lewis
a68d2242d3 Add the find method to the Eloquent Query class.
Signed-off-by: Jason Lewis <jason.lewis1991@gmail.com>
2012-12-18 19:14:51 +11:00
Phill Sparks
8296f30c82 Update laravel/database/eloquent/model.php
Make query() available publicly via object and statically.
2012-11-27 12:33:01 +00:00
Franz Liedke
ff4b43c72f Ignore hidden relationships in to_array(). 2012-11-23 03:23:13 +01:00
Edward Mann
c6290d11fa Fixed connector options merge bug.
Fixed issue with options ordering when merging the default and user values into one array.
2012-11-14 18:57:46 +00:00
Franz Liedke
172ebcb00d Fix Pivot table losing its connection.
This hopefully fixes #1198 and while it doesn't solve the underlying problem mentioned in #1429, it does the tackle the resulting mess. :)
2012-11-09 02:15:28 +01:00
Dejan Geci
de5658f5a7 Added return value from PDO::commit
Signed-off-by: Dejan Geci <dejan.geci@gmail.com>
2012-11-07 21:45:44 +01:00
Franz Liedke
b88c9144ec Make insert_get_id() work with non-auto-incrementing columns. 2012-11-01 18:16:44 +01:00
Taylor Otwell
0a0eb3779c Merge pull request #1365 from sdbondi/develop
Ref #649 - Added query builder support for BETWEEN clauses
2012-10-25 06:11:15 -07:00
Jason Lewis
1a7f2bf27f Merge pull request #1352 from laravie/patch/code-standard
[Code Standard] Slight improvement to use of tab over space and curly bracket
2012-10-20 07:29:39 -07:00
Stan Bondi
5f4838726e Ref #649 - Added query builder support for BETWEEN clauses
Signed-off-by: Stan Bondi <stan@stanley-pc.(none)>
2012-10-17 23:36:18 +02:00
Franz Liedke
2d052a3222 Get rid of duplicate function call. 2012-10-17 18:28:42 +03:00
Franz Liedke
a6c681db39 Make sure sync() always works with arrays. 2012-10-17 18:27:35 +03:00
crynobone
fd86aef25a Trivial improvement to Laravel, while it is not documented, it has been a standard in Laravel to use tab as indentation and new line for curly bracket
Signed-off-by: crynobone <crynobone@gmail.com>
2012-10-15 23:35:53 +08:00
Taylor Otwell
d55328cc52 Merge pull request #1320 from dejangeci/feature/dbexception-inner
Added a getInner method for retrieving the inner exception
2012-10-07 12:05:01 -07:00
Taylor Otwell
3416506194 increment version. refactor eloquent eager loading matching. 2012-10-07 14:04:29 -05:00
Taylor Otwell
1df8fa91fc Merge pull request #1322 from vFragosop/eloquent/relationship_performance
Fixing has_one iterations
2012-10-07 11:56:24 -07:00
Vinícius Fragoso
f6c7cf2dcd Fixing pivot on has_one aswell as properly indenting 2012-10-07 12:15:57 -03:00
Dejan Geci
165da94aee Added a getInner method for retrieving the inner exception
Signed-off-by: Dejan Geci <dejan.geci@gmail.com>
2012-10-07 13:55:32 +02:00
Taylor Otwell
790a540620 Merge pull request #1294 from danielboendergaard/phpdoc-fix
Fixed wrong return type in phpdoc
2012-10-06 12:39:23 -07:00
Vinícius Fragoso
f36446bd10 Improving laravel relationship performance 2012-10-05 10:35:48 -03:00
Daniel Bøndergaard
54397e1bf2 Fixed wrong return type in phpdoc
Signed-off-by: Daniel Bøndergaard <db@helmstmt.com>
2012-09-28 10:10:35 +02:00