Skip to content
Browse files

removed auto-prop-creation feature because it is confusing and it may…

… lead to hard to find bugs
  • Loading branch information...
1 parent aac56ee commit ec901180f0a6ebf71e02995e6cbf7ea56fdc47f5 Gabor committed Aug 22, 2011
View
0 README.markdown 100644 → 100755
File mode changed.
View
0 RedBean/Adapter.php 100644 → 100755
File mode changed.
View
0 RedBean/Adapter/DBAdapter.php 100644 → 100755
File mode changed.
View
0 RedBean/AssociationManager.php 100644 → 100755
File mode changed.
View
0 RedBean/BeanCan.php 100644 → 100755
File mode changed.
View
0 RedBean/BeanHelperFacade.php 100644 → 100755
File mode changed.
View
0 RedBean/Cooker.php 100644 → 100755
File mode changed.
View
0 RedBean/DefaultBeanFormatter.php 100644 → 100755
File mode changed.
View
0 RedBean/Driver.php 100644 → 100755
File mode changed.
View
0 RedBean/Driver/PDO.php 100644 → 100755
File mode changed.
View
0 RedBean/Exception.php 100644 → 100755
File mode changed.
View
0 RedBean/Exception/SQL.php 100644 → 100755
File mode changed.
View
0 RedBean/Exception/Security.php 100644 → 100755
File mode changed.
View
0 RedBean/ExtAssociationManager.php 100644 → 100755
File mode changed.
View
0 RedBean/Facade.php 100644 → 100755
File mode changed.
View
0 RedBean/FacadeHelper.php 100644 → 100755
File mode changed.
View
0 RedBean/IBeanFormatter.php 100644 → 100755
File mode changed.
View
0 RedBean/IBeanHelper.php 100644 → 100755
File mode changed.
View
0 RedBean/IModelFormatter.php 100644 → 100755
File mode changed.
View
0 RedBean/ModelHelper.php 100644 → 100755
File mode changed.
View
0 RedBean/OODB.php 100644 → 100755
File mode changed.
View
9 RedBean/OODBBean.php 100644 → 100755
@@ -13,6 +13,13 @@
*/
class RedBean_OODBBean implements IteratorAggregate, ArrayAccess {
+ /**
+ * Reference to NULL property for magic getter.
+ *
+ * @var Null $null
+ */
+ private $null = null;
+
/**
* Properties of the bean. These are kept in a private
@@ -245,7 +252,7 @@ public function &__get( $property ) {
}
}
- $this->properties[$property] = null;
+ return $this->null;
}
View
0 RedBean/Observable.php 100644 → 100755
File mode changed.
View
0 RedBean/Observer.php 100644 → 100755
File mode changed.
View
0 RedBean/Plugin/IOptimizer.php 100644 → 100755
File mode changed.
View
0 RedBean/Plugin/Optimizer.php 100644 → 100755
File mode changed.
View
0 RedBean/Plugin/Optimizer/Datetime.php 100644 → 100755
File mode changed.
View
0 RedBean/Plugin/Optimizer/Shrink.php 100644 → 100755
File mode changed.
View
0 RedBean/Plugin/QueryLogger.php 100644 → 100755
File mode changed.
View
0 RedBean/QueryWriter.php 100644 → 100755
File mode changed.
View
0 RedBean/QueryWriter/AQueryWriter.php 100644 → 100755
File mode changed.
View
0 RedBean/QueryWriter/MySQL.php 100644 → 100755
File mode changed.
View
0 RedBean/QueryWriter/PostgreSQL.php 100644 → 100755
File mode changed.
View
0 RedBean/QueryWriter/SQLite.php 100644 → 100755
File mode changed.
View
0 RedBean/QueryWriter/SQLiteT.php 100644 → 100755
File mode changed.
View
0 RedBean/Setup.php 100644 → 100755
File mode changed.
View
0 RedBean/SimpleModel.php 100644 → 100755
File mode changed.
View
0 RedBean/ToolBox.php 100644 → 100755
File mode changed.
View
0 RedBean/ViewManager.php 100644 → 100755
File mode changed.
View
0 RedBean/license.txt 100644 → 100755
File mode changed.
View
0 RedBean/redbean.inc.php 100644 → 100755
File mode changed.
View
0 jsontest.php 100644 → 100755
File mode changed.
View
0 ltest.php 100644 → 100755
File mode changed.
View
15 n1test.php 100644 → 100755
@@ -5,8 +5,8 @@
//require("RedBean/redbean.inc.php");
require('rb.php');
-//R::setup("pgsql:host=localhost;dbname=oodb","postgres","maxpass"); $db="pgsql";
-R::setup("mysql:host=localhost;dbname=oodb","root"); $db="mysql";
+R::setup("pgsql:host=localhost;dbname=oodb","postgres",""); $db="pgsql";
+//R::setup("mysql:host=localhost;dbname=oodb","root"); $db="mysql";
//R::setup(); $db="sqlite";
@@ -1012,6 +1012,7 @@ public function getAlias($a){ return $a; }
$book = R::dispense('book');
$page = R::dispense('page');
//wrong property name
+$book->wrongProperty = array($page);
try{
$book->wrongProperty[] = $page;
R::store($book);
@@ -1023,6 +1024,16 @@ public function getAlias($a){ return $a; }
catch(Exception $e){
fail();
}
+
+//Test for quick detect change
+droptables();
+$book = R::dispense('book');
+if ($book->prop) { }
+//echo $book;
+asrt(isset($book->prop),false);//not a very good test
+asrt(in_array('prop',array_keys($book->export())),false);//better...
+
+
$book = R::dispense('book');
$page = R::dispense('page');
$book->paper = $page;
View
0 pgtest.php 100644 → 100755
File mode changed.
View
0 replica.php 100644 → 100755
File mode changed.
View
0 replica.xml 100644 → 100755
File mode changed.
View
0 space.php 100644 → 100755
File mode changed.
View
0 test-dist.ini 100644 → 100755
File mode changed.
View
3 test.php 100644 → 100755
@@ -2046,6 +2046,9 @@ function setget($val,$castToString=0) {
asrt((setget(false)==false),true);
testpack("fetch tagged items");
+R::exec("drop table author_book");
+R::exec("drop table author");
+R::exec("drop table book");
R::wipe("book");
R::wipe("tag");
R::wipe("book_tag");

0 comments on commit ec90118

Please sign in to comment.
Something went wrong with that request. Please try again.