profile
viewpoint
Zacharias Luiten netiul @Karify Utrecht, Netherlands http://www.zachariasluiten.com

netiul/DOMPDFModule 2

A Zend Framework 2 module for incorporating DOMPDF support - Originally by Raymond Kolbe

netiul/doctrine-money-module 1

Zend Framework integration of Doctrine and moneyphp/money

netiul/AoC 0

My solutions for AoC challange

netiul/api-tools-doctrine-querybuilder 0

Laminas API Tools Doctrine QueryBuilder module

netiul/cgkutrechtwest-gadgets 0

Automatically exported from code.google.com/p/cgkutrechtwest-gadgets

netiul/ckeditor5 0

Powerful rich text editor framework with a modular architecture, modern integrations and features like collaborative editing.

netiul/common 0

Doctrine Common

netiul/css-element-queries 0

CSS-Element-Queries Polyfill. proof-of-concept for high-speed element dimension/media queries in valid css.

netiul/data-anon 0

Data Anonymization implementation in Kotiln

netiul/docker-sync 0

Run your application at full speed while syncing your code for development, finally empowering you to utilize docker for development under OSX/Windows/*Linux

issue openednikolaposa/monolog-factory

PHP 8 support

Hey!

Do you plan to support PHP 8 on this library? I can try to contribute the change if so.

created time in 2 days

issue commentdoctrine/DoctrineModule

Batch insert parent/children regenerate id of each child

Same result seems that items in array collection lost their ids

mdjaman

comment created time in 21 days

issue commentdoctrine/DoctrineModule

Batch insert parent/children regenerate id of each child

So, my question still stands. If you turn off auto generated ids does it work?

mdjaman

comment created time in 21 days

issue commentdoctrine/DoctrineModule

Batch insert parent/children regenerate id of each child

FWIW ODM-wise it's perfectly fine to have an id before persisting - that will cause an upsert operation

mdjaman

comment created time in 21 days

issue commentdoctrine/DoctrineModule

Batch insert parent/children regenerate id of each child

I suspect that doctrine hydrator doesn't correctly handle the onetomany relationship since it ignored the given id

mdjaman

comment created time in 22 days

issue commentdoctrine/DoctrineModule

Batch insert parent/children regenerate id of each child

Can u tell me if I keep the auto generated why I can't set the Id. I think this issue comes from the generated hydrator

mdjaman

comment created time in 22 days

issue closeddoctrine/DoctrineModule

add to arraycollection reset id

Hello maybe i am totally wrong but persisting master and details (one to many) reset generate new id of children even if i gave it my own id

closed time in 22 days

mdjaman

issue commentdoctrine/DoctrineModule

add to arraycollection reset id

Conversation moved to duplicate issue: https://github.com/doctrine/DoctrineModule/issues/708

mdjaman

comment created time in 22 days

issue commentdoctrine/DoctrineModule

Batch insert parent/children regenerate id of each child

If I understand this correctly you are using auto generated ids but you are supplying the ids and the problem is your supplied ids are being replaced with auto generated ids. Have I got that right?

If I am right then why don't you change the ids to not be auto generated and see if that fixes it?

mdjaman

comment created time in 22 days

issue commentdoctrine/DoctrineModule

seems 4.1 was tagged as 4.0.4

4.0.5 has issues with Composer 2. Expect a new release to fix that.

svycka

comment created time in 22 days

issue openeddoctrine/DoctrineModule

Batch insert parent/children regenerate id of each child

Hello maybe i am totally wrong but persisting master and details (OneToMany) resets given id of children. The parent Id is correct but all his ReferenceMany object got new one

update.json [ { "created_at": "2019-02-14T09:57:56-0500", "updated_at": "2020-05-20T11:40:27-0400", "id": "5c6581f45771db0320faf769", "name": "Fiche A", "code": "FNC", "alias": "fiche-a", "description": "Fiche de notification a", "disease": { "id": "5b06a66d5771dba3c7a6a598" }, "template": false, "complete": true, "useAsDefault": false, "items": [ { "created_at": "2019-02-14T09:57:56-0500", "updated_at": "2020-05-27T13:40:27-0400", "id": "5c6581f45771db0320faf76b", "label": "Identifiant Unique", "name": "EPID", "alias": "epid_1", "type": "", "required": false, "readonly": false, "values": [], "position": 1, "tag": "epid", "children": [ { "created_at": "2019-02-14T09:57:56-0500", "updated_at": "2020-05-21T15:05:23-0400", "id": "5c6581f45771db0320faf777", "label": "Code échantillon", "name": "code", "alias": "code_1", "type": "text", "required": false, "readonly": false, "values": [], "position": 1, "children": [], "masks": [], "validators": [] } ], "meta": { "locked": true, "cascadeOperation": false }, "masks": [], "validators": [] } ], "dataTable": { "created_at": "2020-05-27T13:56:38-0400", "id": "5ecea9d6a47e486913436400", "name": "Tableau de données A", "alias": "tableau-de-donnees-a", "columns": [] }, "meta": { "finalResultField": "finalresult" } }]

NotificationFormItem.php (Details/Child)

class NotificationFormItem
{

    /**
     * @var string
     * @ODM\Id
     */
    protected $id;

    /**
     * @var string
     * @ODM\Field(type="string")
     */
    protected $label;

    /**
     * @var string
     * @ODM\Field(type="string")
     */
    protected $name;

    /**
     * @var string
     * @ODM\Field(type="string")
     */
    protected $alias;

    /**
     * @var string
     * @ODM\Field(type="string")
     */
    protected $description;

  /**
     * @var array
     * @ODM\Field(type="collection")
     */
    protected $values = [];

    /**
     * @var NotificationFormInterface
     * @ODM\ReferenceOne(targetDocument="NotificationForm", inversedBy="items", storeAs="id")
     */
    protected $notificationForm;

    /**
     * @var NotificationFormItemInterface
     * @ODM\ReferenceOne(
     *     targetDocument="NotificationFormItem",
     *     storeAs="id",
     *     inversedBy="children",
     *     cascade={"persist", "merge"}
     * )
     */
    protected $parent;

    /**
     * @var Collection|array
     * @ODM\ReferenceMany(
     *     targetDocument="NotificationFormItem",
     *     mappedBy="parent",
     *     sort={"position": "asc"},
     *     cascade={"all"},
     *     orphanRemoval=true
     * )
     */
    protected $children;


    /**
     * NotificationFormItem constructor.
     */
    public function __construct()
    {
        $this->children = new ArrayCollection();
    }

// skipping getters/setters

NotificationForm.php (Master/Parent)

class NotificationForm extends BaseDocument
{
    use BlameableDocument;

    /**
     * @var string
     * @ODM\Id
     */
    protected $id;

    /**
     * @var string
     * @ODM\Field(type="string")
     */
    protected $name;

    /**
     * @var string
     * @ODM\Field(type="string")
    */
    protected $code;

    /**
     * @var string
     * @ODM\Field(type="string")
     */
    protected $alias;

    /**
     * @var string
     * @ODM\Field(type="string")
     */
    protected $description;


    /**
     * @var Collection|array
     * @ODM\ReferenceMany(
     *     targetDocument="NotificationFormItem",
     *     mappedBy="notificationForm",
     *     storeAs="id",
     *     sort={"position": "asc"},
     *     cascade={"all"}
     * )
     */
    protected $items;

    /**
     * NotificationForm constructor.
     */
    public function __construct()
    {
        $this->items = new ArrayCollection();
    }

created time in 22 days

issue commentdoctrine/DoctrineModule

seems 4.1 was tagged as 4.0.4

https://github.com/doctrine/DoctrineModule/releases/tag/4.0.5

composer update will update to v4.0.5 The release shows out of sort order in the releases because, I think, releases are sorted by their order in the commit tree.

svycka

comment created time in 23 days

created tagdoctrine/DoctrineModule

tag4.0.5

Doctrine Module for Laminas

created time in 23 days

release doctrine/DoctrineModule

4.0.5

released time in 23 days

IssuesEvent

issue commentdoctrine/DoctrineModule

seems 4.1 was tagged as 4.0.4

Got it. I'll release a 4.0.5 sson

svycka

comment created time in 23 days

issue commentdoctrine/DoctrineModule

seems 4.1 was tagged as 4.0.4

@TomHAnderson I guess you did not understand the issue. I am saying that 4.1.0, 4.0.3, and 4.0.4 same version all of those versions tagged the same commit https://github.com/doctrine/DoctrineModule/commit/ade52811bf990cf0f739b5f026cfb09e5ddf9742

svycka

comment created time in 23 days

issue commentdoctrine/DoctrineModule

seems 4.1 was tagged as 4.0.4

@TomHAnderson yes i saw that problem.

but still we have https://github.com/doctrine/DoctrineModule/blob/4.0.4/composer.json#L53-L54 in 4.0.4 and same in 4.1.0 The problem i mention is also for 4.0.4.

The change of the composer.json should fix that problem. Or is the support for orm2.7 stopped?

svycka

comment created time in 23 days

issue commentdoctrine/DoctrineModule

seems 4.1 was tagged as 4.0.4

See the release notes for 4.0.4: https://github.com/doctrine/DoctrineModule/releases/tag/4.0.4

svycka

comment created time in 23 days

issue commentdoctrine/DoctrineModule

seems 4.1 was tagged as 4.0.4

Correct, @kokspflanze . A PR was submitted for ORM 2.8 which should have been put in cold storage. But, instead, it was merged. That's the root cause of the 4.1.0 branch.

4.0.4 should be installable AND the 4.0.x branch will continue to be maintained.

svycka

comment created time in 23 days

issue commentdoctrine/DoctrineModule

seems 4.1 was tagged as 4.0.4

i think its the same problem like in https://github.com/doctrine/doctrine-laminas-hydrator/pull/14

we need to change some dependencies

        "doctrine/persistence": "^1.3.7 || ^2.0.0",
        "doctrine/inflector": "^1.4.3 || ^2.0.3",

Many ppl has that problem, if you compare the downloads of 4.0.2 and 4.1.0. Than you see that most ppl still use the 4.0.2 and nobody use 4.1.0.

svycka

comment created time in 23 days

issue commentdoctrine/DoctrineModule

seems 4.1 was tagged as 4.0.4

@TomHAnderson maintained but can't install 4.0.4 nor 4.0.3

svycka

comment created time in 23 days

issue commentdoctrine/DoctrineModule

add to arraycollection reset id

What i doing is hydrate new entity from the json array

mdjaman

comment created time in 23 days

issue commentdoctrine/DoctrineModule

add to arraycollection reset id

Hello maybe i am totally wrong but persisting master and details (OneToMany) resets given id of children. The parent Id is correct but all his ReferenceMany object got new one

update.json [ { "created_at": "2019-02-14T09:57:56-0500", "updated_at": "2020-05-20T11:40:27-0400", "id": "5c6581f45771db0320faf769", "name": "Fiche A", "code": "FNC", "alias": "fiche-a", "description": "Fiche de notification a", "disease": { "id": "5b06a66d5771dba3c7a6a598" }, "template": false, "complete": true, "useAsDefault": false, "items": [ { "created_at": "2019-02-14T09:57:56-0500", "updated_at": "2020-05-27T13:40:27-0400", "id": "5c6581f45771db0320faf76b", "label": "Identifiant Unique", "name": "EPID", "alias": "epid_1", "type": "", "required": false, "readonly": false, "values": [], "position": 1, "tag": "epid", "children": [ { "created_at": "2019-02-14T09:57:56-0500", "updated_at": "2020-05-21T15:05:23-0400", "id": "5c6581f45771db0320faf777", "label": "Code échantillon", "name": "code", "alias": "code_1", "type": "text", "required": false, "readonly": false, "values": [], "position": 1, "children": [], "masks": [], "validators": [] } ], "meta": { "locked": true, "cascadeOperation": false }, "masks": [], "validators": [] } ], "dataTable": { "created_at": "2020-05-27T13:56:38-0400", "id": "5ecea9d6a47e486913436400", "name": "Tableau de données A", "alias": "tableau-de-donnees-a", "columns": [] }, "meta": { "finalResultField": "finalresult" } }]

NotificationFormItem.php (Details/Child)

class NotificationFormItem {

/**
 * @var string
 * @ODM\Id
 */
protected $id;

/**
 * @var string
 * @ODM\Field(type="string")
 */
protected $label;

/**
 * @var string
 * @ODM\Field(type="string")
 */
protected $name;

/**
 * @var string
 * @ODM\Field(type="string")
 */
protected $alias;

/**
 * @var string
 * @ODM\Field(type="string")
 */
protected $description;

/** * @var array * @ODM\Field(type="collection") */ protected $values = [];

/**
 * @var NotificationFormInterface
 * @ODM\ReferenceOne(targetDocument="NotificationForm", inversedBy="items", storeAs="id")
 */
protected $notificationForm;

/**
 * @var NotificationFormItemInterface
 * @ODM\ReferenceOne(
 *     targetDocument="NotificationFormItem",
 *     storeAs="id",
 *     inversedBy="children",
 *     cascade={"persist", "merge"}
 * )
 */
protected $parent;

/**
 * @var Collection|array
 * @ODM\ReferenceMany(
 *     targetDocument="NotificationFormItem",
 *     mappedBy="parent",
 *     sort={"position": "asc"},
 *     cascade={"all"},
 *     orphanRemoval=true
 * )
 */
protected $children;


/**
 * NotificationFormItem constructor.
 */
public function __construct()
{
    $this->children = new ArrayCollection();
}

// skipping getters/setters NotificationForm.php (Master/Parent)

class NotificationForm extends BaseDocument { use BlameableDocument;

/**
 * @var string
 * @ODM\Id
 */
protected $id;

/**
 * @var string
 * @ODM\Field(type="string")
 */
protected $name;

/**
 * @var string
 * @ODM\Field(type="string")
*/
protected $code;

/**
 * @var string
 * @ODM\Field(type="string")
 */
protected $alias;

/**
 * @var string
 * @ODM\Field(type="string")
 */
protected $description;


/**
 * @var Collection|array
 * @ODM\ReferenceMany(
 *     targetDocument="NotificationFormItem",
 *     mappedBy="notificationForm",
 *     storeAs="id",
 *     sort={"position": "asc"},
 *     cascade={"all"}
 * )
 */
protected $items;

/**
 * NotificationForm constructor.
 */
public function __construct()
{
    $this->items = new ArrayCollection();
}
mdjaman

comment created time in 23 days

issue commentdoctrine/DoctrineModule

seems 4.1 was tagged as 4.0.4

4.0.x and 4.1.x are maintained.

svycka

comment created time in 23 days

more