Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit88aa347

Browse files
committed
Removed types list
This is really doctrine specific, the sf docs should not document this,kind of SoC for docs 😉.
1 parentc95a68d commit88aa347

File tree

1 file changed

+2
-100
lines changed

1 file changed

+2
-100
lines changed

‎book/doctrine.rst

Lines changed: 2 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,106 +1351,8 @@ Doctrine Field Types Reference
13511351

13521352
Doctrine comes with a large number of field types available. Each of these
13531353
maps a PHP data type to a specific column type in whatever database you're
1354-
using. The following types are supported in Doctrine:
1355-
1356-
* **Strings**
1357-
1358-
* ``string`` (used for shorter strings)
1359-
* ``text`` (used for larger strings)
1360-
1361-
* **Numbers**
1362-
1363-
* ``integer``
1364-
* ``smallint``
1365-
* ``bigint``
1366-
* ``decimal``
1367-
* ``float``
1368-
1369-
* **Dates and Times** (use a `DateTime`_ object for these fields in PHP)
1370-
1371-
* ``date``
1372-
* ``time``
1373-
* ``datetime``
1374-
* ``datetimetz``
1375-
1376-
* **Other Types**
1377-
1378-
* ``boolean``
1379-
* ``object`` (serialized and stored in a ``CLOB`` field)
1380-
* ``array`` (serialized and stored in a ``CLOB`` field)
1381-
* ``blob`` (mapped to a resource stream)
1382-
* ``simple_array`` (serialized using:phpfunction:`implode()` and:phpfunction:`explode()`,
1383-
with a comma as delimiter, and stored in a ``CLOB`` field)
1384-
* ``json_array`` (serialized using:phpfunction:`json_encode()` and:phpfunction:`json_decode()`,
1385-
and stored in a ``CLOB`` field)
1386-
* ``guid``
1387-
1388-
For more information, see Doctrine's `Mapping Types documentation`_.
1389-
1390-
Field Options
1391-
~~~~~~~~~~~~~
1392-
1393-
Each field can have a set of options applied to it. The available options
1394-
include ``type`` (defaults to ``string``), ``name``, ``length``, ``unique``
1395-
and ``nullable``. Take a few examples:
1396-
1397-
..configuration-block::
1398-
1399-
..code-block::php-annotations
1400-
1401-
/**
1402-
* A string field with length 255 that cannot be null
1403-
* (reflecting the default values for the "type", "length"
1404-
* and *nullable* options)
1405-
*
1406-
* @ORM\Column()
1407-
*/
1408-
protected $name;
1409-
1410-
/**
1411-
* A string field of length 150 that persists to an "email_address" column
1412-
* and has a unique index.
1413-
*
1414-
* @ORM\Column(name="email_address", unique=true, length=150)
1415-
*/
1416-
protected $email;
1417-
1418-
..code-block::yaml
1419-
1420-
fields:
1421-
# A string field length 255 that cannot be null
1422-
# (reflecting the default values for the "length" and *nullable* options)
1423-
# type attribute is necessary in YAML definitions
1424-
name:
1425-
type:string
1426-
1427-
# A string field of length 150 that persists to an "email_address" column
1428-
# and has a unique index.
1429-
email:
1430-
type:string
1431-
column:email_address
1432-
length:150
1433-
unique:true
1434-
1435-
..code-block::xml
1436-
1437-
<!--
1438-
A string field length 255 that cannot be null
1439-
(reflecting the default values for the "length" and *nullable* options)
1440-
type attribute is necessary in XML definitions
1441-
-->
1442-
<fieldname="name"type="string" />
1443-
<fieldname="email"
1444-
type="string"
1445-
column="email_address"
1446-
length="150"
1447-
unique="true"
1448-
/>
1449-
1450-
..note::
1451-
1452-
There are a few more options not listed here. For more details, see
1453-
Doctrine's `Property Mapping documentation`_
1354+
using. To see a list of all available types and more information, see
1355+
Doctrine's `Mapping Types documentation`_.
14541356

14551357
..index::
14561358
single: Doctrine; ORM console commands

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp