@@ -622,8 +622,10 @@ Once you have your repository, you have access to all sorts of helpful methods::
622
622
You can also take advantage of the useful ``findBy `` and ``findOneBy `` methods
623
623
to easily fetch objects based on multiple conditions::
624
624
625
- // query for one product matching by name and price
626
- $product = $repository->findOneBy(array('name' => 'foo', 'price' => 19.99));
625
+ // query for one product matching be name and price
626
+ $product = $repository->findOneBy(
627
+ array('name' => 'foo', 'price' => 19.99)
628
+ );
627
629
628
630
// query for all products matching the name, ordered by price
629
631
$products = $repository->findBy(
@@ -1144,7 +1146,8 @@ Now you can see this new code in action! Imagine you're inside a controller::
1144
1146
$em->flush();
1145
1147
1146
1148
return new Response(
1147
- 'Created product id: '.$product->getId().' and category id: '.$category->getId()
1149
+ 'Created product id: '.$product->getId()
1150
+ .' and category id: '.$category->getId()
1148
1151
);
1149
1152
}
1150
1153
}
@@ -1478,8 +1481,8 @@ and ``nullable``. Take a few examples:
1478
1481
protected $name;
1479
1482
1480
1483
/**
1481
- * A string field of length 150 that persists to an "email_address" column
1482
- * and has a unique index.
1484
+ * A string field of length 150 that persists to an
1485
+ * "email_address" column and has a unique index.
1483
1486
*
1484
1487
* @ORM\Column(name="email_address", unique=true, length=150)
1485
1488
*/
@@ -1489,13 +1492,14 @@ and ``nullable``. Take a few examples:
1489
1492
1490
1493
fields :
1491
1494
# A string field length 255 that cannot be null
1492
- # (reflecting the default values for the "length" and *nullable* options)
1493
- # type attribute is necessary in YAML definitions
1495
+ # (reflecting the default values for the "length"
1496
+ # and *nullable* options) type attribute is
1497
+ # necessary in YAML definitions
1494
1498
name :
1495
1499
type : string
1496
1500
1497
- # A string field of length 150 that persists to an "email_address" column
1498
- # and has a unique index.
1501
+ # A string field of length 150 that persists to
1502
+ # an "email_address" column and has a unique index.
1499
1503
email :
1500
1504
type : string
1501
1505
column : email_address
@@ -1506,8 +1510,9 @@ and ``nullable``. Take a few examples:
1506
1510
1507
1511
<!--
1508
1512
A string field length 255 that cannot be null
1509
- (reflecting the default values for the "length" and *nullable* options)
1510
- type attribute is necessary in XML definitions
1513
+ (reflecting the default values for the "length"
1514
+ and *nullable* options) type attribute is
1515
+ necessary in XML definitions
1511
1516
-->
1512
1517
<field name =" name" type =" string" />
1513
1518
<field name =" email"
0 commit comments