Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
562a4876
Commit
562a4876
authored
Nov 27, 2007
by
Jonathan.Wage
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes #568
parent
7389d828
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
4 deletions
+19
-4
Pgsql.php
lib/Doctrine/Import/Pgsql.php
+11
-1
Schema.php
lib/Doctrine/Import/Schema.php
+1
-0
Record.php
lib/Doctrine/Record.php
+5
-1
Abstract.php
lib/Doctrine/Record/Abstract.php
+2
-2
No files found.
lib/Doctrine/Import/Pgsql.php
View file @
562a4876
...
...
@@ -175,12 +175,22 @@ class Doctrine_Import_Pgsql extends Doctrine_Import
'length'
=>
$decl
[
'length'
],
'fixed'
=>
$decl
[
'fixed'
],
'unsigned'
=>
$decl
[
'unsigned'
],
'notnull'
=>
(
$val
[
'isnotnull'
]
==
''
),
'notnull'
=>
(
$val
[
'isnotnull'
]
==
true
),
'default'
=>
$val
[
'default'
],
'primary'
=>
(
$val
[
'pri'
]
==
't'
),
);
$matches
=
array
();
if
(
preg_match
(
"/^nextval\('(.*)'(::.*)?\)$/"
,
$description
[
'default'
],
$matches
))
{
$description
[
'sequence'
]
=
$this
->
conn
->
formatter
->
fixSequenceName
(
$matches
[
1
]);
$description
[
'default'
]
=
null
;
}
$columns
[
$val
[
'field'
]]
=
$description
;
}
return
$columns
;
}
...
...
lib/Doctrine/Import/Schema.php
View file @
562a4876
...
...
@@ -332,6 +332,7 @@ class Doctrine_Import_Schema
$colDesc
[
'default'
]
=
isset
(
$field
[
'default'
])
?
$field
[
'default'
]
:
null
;
$colDesc
[
'autoincrement'
]
=
isset
(
$field
[
'autoincrement'
])
?
(
bool
)
(
isset
(
$field
[
'autoincrement'
])
&&
$field
[
'autoincrement'
])
:
null
;
$colDesc
[
'autoincrement'
]
=
isset
(
$field
[
'autoinc'
])
?
(
bool
)
(
isset
(
$field
[
'autoinc'
])
&&
$field
[
'autoinc'
])
:
$colDesc
[
'autoincrement'
];
$colDesc
[
'sequence'
]
=
isset
(
$field
[
'sequence'
])
?
(
string
)
$field
[
'sequence'
]
:
null
;
$colDesc
[
'values'
]
=
isset
(
$field
[
'values'
])
?
(
array
)
$field
[
'values'
]
:
null
;
$validators
=
Doctrine
::
getValidators
();
...
...
lib/Doctrine/Record.php
View file @
562a4876
...
...
@@ -1294,8 +1294,12 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count
*
* @return Doctrine_Record
*/
public
function
copy
()
public
function
copy
(
$deep
=
false
)
{
if
(
$deep
)
{
return
$this
->
copyDeep
();
}
$data
=
$this
->
_data
;
if
(
$this
->
_table
->
getIdentifierType
()
===
Doctrine
::
IDENTIFIER_AUTOINC
)
{
...
...
lib/Doctrine/Record/Abstract.php
View file @
562a4876
...
...
@@ -293,7 +293,6 @@ abstract class Doctrine_Record_Abstract extends Doctrine_Access
*/
public
function
actAs
(
$tpl
,
array
$options
=
array
())
{
if
(
!
is_object
(
$tpl
))
{
if
(
class_exists
(
$tpl
,
true
))
{
$tpl
=
new
$tpl
(
$options
);
...
...
@@ -312,6 +311,7 @@ abstract class Doctrine_Record_Abstract extends Doctrine_Access
if
(
!
(
$tpl
instanceof
Doctrine_Template
))
{
throw
new
Doctrine_Record_Exception
(
'Loaded plugin class is not an istance of Doctrine_Template.'
);
}
$className
=
get_class
(
$tpl
);
$this
->
_table
->
addTemplate
(
$className
,
$tpl
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment