- WIP on migration and some bug fixes linked to withJoin() select problems

This commit is contained in:
Dave Mc Nicoll committed 2025-05-15 18:05:23 +00:00
1 parent 761e0401b0
commit cc6048d4ee
20 files changed
+196 -93

No files matched your search

+4 -1
View File
@@ -56,7 +56,10 @@ class DatasetHandler
}
elseif ( $field->expectType('array') ) {
if ( is_string($value)) {
if (substr($value, 0, 1) === "a") {
if (empty($value)) {
yield $field->name => [];
}
elseif (substr($value, 0, 1) === "a") {
yield $field->name => unserialize($value);
}
-17
View File
@@ -13,9 +13,6 @@ class Column
{
use \Ulmus\EntityTrait;
#[Field\Id]
public ? id $srs_id;
#[Field(name: "TABLE_CATALOG", length: 512)]
public string $tableCatalog;
@@ -64,24 +61,10 @@ class Column
# #[Field(name: "COLLATION_TYPE", type: "longtext")]
# public string $type;
#[Field(name: "COLUMN_KEY", length: 3)]
public string $key;
#[Field(name: "EXTRA", length: 30)]
public string $extra;
#[Field(name: "PRIVILEGES", length: 80)]
public string $privileges;
#[Field(name: "COLUMN_COMMENT", length: 1024)]
public string $comment;
# #[Field(name: "IS_GENERATED", length: 6)]
# public string $generated;
#[Field(name: "GENERATION_EXPRESSION", type: "longtext")]
public ? string $generationExpression;
public function matchFieldDefinition(ReflectedProperty $definition) : bool
{
$nullable = $this->nullable === 'YES';
+21
View File
@@ -2,8 +2,28 @@
namespace Ulmus\Entity\Mysql;
use Ulmus\Attribute\Property\Field;
class Column extends \Ulmus\Entity\InformationSchema\Column
{
#[Field\Id]
public ? id $srs_id;
#[Field(name: "COLUMN_KEY", length: 3)]
public string $key;
#[Field(name: "EXTRA", length: 30)]
public string $extra;
#[Field(name: "PRIVILEGES", length: 80)]
public string $privileges;
#[Field(name: "COLUMN_COMMENT", length: 1024)]
public string $comment;
#[Field(name: "GENERATION_EXPRESSION", type: "longtext")]
public ? string $generationExpression;
# TODO ! Handle FUNCTIONAL default value
protected function canHaveDefaultValue(): bool
{
@@ -12,4 +32,5 @@ class Column extends \Ulmus\Entity\InformationSchema\Column
]);
}
}