Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 2.2.3
-
Component/s: Mapping Drivers
-
Security Level: All
-
Labels:None
-
Environment:PHP
Description
When using class type inheritance - @InheritanceType("JOINED") and inserting new entity with a custom mapping type, custom type method convertToDatabaseValueSQL() is never called.
Here is sample class mapping:
Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
/** * @Table(name="item") * @Entity * @InheritanceType("JOINED") * @DiscriminatorColumn(name="type_id", type="smallint") * @DiscriminatorMap({1 = "ItemPerson"}) */ class Item { /** * @Column(name="tsv", type="tsvector", nullable=true) */ protected $tsv; } /** * @Table(name="item_person") * @Entity */ class ItemPerson extends Item { }
I am using the same custom TsvectorType with simple entities and even Mapped Superclasses and it works perfectly, however on InheritanceType("JOINED") method convertToDatabaseValueSQL() is never called :/
Hope someone knows how to fix this.
Thank you.
Activity
Kaspars Sproģis
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Summary | Inserting a new entity with a custom mapping type does not trigger requireSQLConversion and convertToDatabaseValueSQL() is never called when using InheritanceType("JOINED") | Inserting a new entity with a custom mapping type does not call convertToDatabaseValueSQL() when using InheritanceType("JOINED") |
| Description |
When using class type inheritance - @InheritanceType("JOINED")
Inserting a new entity with a custom mapping type does not trigger requireSQLConversion and custom type method convertToDatabaseValueSQL() is never called. Here is sample class mapping: {code:php} /** * @Table(name="item") * @Entity * @InheritanceType("JOINED") * @DiscriminatorColumn(name="type_id", type="smallint") * @DiscriminatorMap({1 = "ItemPerson"}) */ class Item { /** * @var boolean $active * * @Column(name="tsv", type="tsvector", nullable=true) */ protected $tsv; } /** * @Table(name="item_person") * @Entity */ class ItemPerson extends Item { } {code} I am using the same custom TsvectorType with simple entities and even Mapped Superclasses and it works perfectly, however on InheritanceType("JOINED") method convertToDatabaseValueSQL() is never called :/ Hope someone knows how to fix this. Thank you. |
When using class type inheritance - @InheritanceType("JOINED") and inserting new entity with a custom mapping type, custom type method convertToDatabaseValueSQL() is never called.
Here is sample class mapping: {code:php} /** * @Table(name="item") * @Entity * @InheritanceType("JOINED") * @DiscriminatorColumn(name="type_id", type="smallint") * @DiscriminatorMap({1 = "ItemPerson"}) */ class Item { /** * @var boolean $active * * @Column(name="tsv", type="tsvector", nullable=true) */ protected $tsv; } /** * @Table(name="item_person") * @Entity */ class ItemPerson extends Item { } {code} I am using the same custom TsvectorType with simple entities and even Mapped Superclasses and it works perfectly, however on InheritanceType("JOINED") method convertToDatabaseValueSQL() is never called :/ Hope someone knows how to fix this. Thank you. |
Kaspars Sproģis
made changes -
| Description |
When using class type inheritance - @InheritanceType("JOINED") and inserting new entity with a custom mapping type, custom type method convertToDatabaseValueSQL() is never called.
Here is sample class mapping: {code:php} /** * @Table(name="item") * @Entity * @InheritanceType("JOINED") * @DiscriminatorColumn(name="type_id", type="smallint") * @DiscriminatorMap({1 = "ItemPerson"}) */ class Item { /** * @var boolean $active * * @Column(name="tsv", type="tsvector", nullable=true) */ protected $tsv; } /** * @Table(name="item_person") * @Entity */ class ItemPerson extends Item { } {code} I am using the same custom TsvectorType with simple entities and even Mapped Superclasses and it works perfectly, however on InheritanceType("JOINED") method convertToDatabaseValueSQL() is never called :/ Hope someone knows how to fix this. Thank you. |
When using class type inheritance - @InheritanceType("JOINED") and inserting new entity with a custom mapping type, custom type method convertToDatabaseValueSQL() is never called.
Here is sample class mapping: {code:php} /** * @Table(name="item") * @Entity * @InheritanceType("JOINED") * @DiscriminatorColumn(name="type_id", type="smallint") * @DiscriminatorMap({1 = "ItemPerson"}) */ class Item { /** * @Column(name="tsv", type="tsvector", nullable=true) */ protected $tsv; } /** * @Table(name="item_person") * @Entity */ class ItemPerson extends Item { } {code} I am using the same custom TsvectorType with simple entities and even Mapped Superclasses and it works perfectly, however on InheritanceType("JOINED") method convertToDatabaseValueSQL() is never called :/ Hope someone knows how to fix this. Thank you. |
Fabio B. Silva
made changes -
| Attachment | DDC2012Test.php [ 11326 ] |
Fabio B. Silva
made changes -
| Status | Open [ 1 ] | Awaiting Feedback [ 10000 ] |
Kaspars Sproģis
made changes -
| Attachment | DDC2012Test.php [ 11327 ] |
Fabio B. Silva
made changes -
| Assignee | Benjamin Eberlei [ beberlei ] | Fabio B. Silva [ fabio.bat.silva ] |
Fabio B. Silva
made changes -
| Status | Awaiting Feedback [ 10000 ] | In Progress [ 3 ] |
Benjamin Eberlei
made changes -
| Status | In Progress [ 3 ] | Resolved [ 5 ] |
| Fix Version/s | 2.2.4 [ 10322 ] | |
| Fix Version/s | 2.3.1 [ 10323 ] | |
| Resolution | Fixed [ 1 ] |