Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

MariaDB [controlloop]> describe Example;
+-----------+--------------+------+-----+---------+-------+
| Field     | Type         | Null | Key | Default | Extra |
+-----------+--------------+------+-----+---------+-------+
| name      | varchar(120) | NO   | PRI | NULL    |       |
| version   | varchar(20)  | NO   | PRI | NULL    |       |
| primed    | tinyint(1)   | YES  |     | NULL    |       |
| timeStamp | datetime(3)  | YES  |     | NULL    |       |
+-----------+--------------+------+-----+---------+-------+

Map and List of Strings

When @ElementCollection is used properly there is enough compatibility. We can see that in the scenario shown below: there is only a small difference in how the primary keys are build.

Code Block
languagejava
titleJpaExampleCollection
collapsetrue
@Entity
@Table(name = "ExampleCollection")
@Data
public class JpaExampleCollection implements Serializable {

    private static final long serialVersionUID = 1L;

    @EmbeddedId
    @VerifyKey
    @NotNull
    private ExampleKey key;

    @ElementCollection
    @Lob
    private Map<@NotNull String, @NotNull String> attributes;

    @ElementCollection
    private List<String> occurrences;
}

...

JpaToscaCapabilityAssignment_ATTRIBUTES table

Currently in tosca model template, due the complexity of the schema there are some issues in foreign keys.

Eclipse-Link

MariaDB [controlloop]> SHOW CREATE TABLE JpaToscaCapabilityAssignment_ATTRIBUTES;
+-----------------------------------------+-------------------------------------------------------------------------------------------+
| Table                       | Create Table                                                                              |
+-----------------------------------------+-------------------------------------------------------------------------------------------+
| JpaToscaCapabilityAssignment_ATTRIBUTES | CREATE TABLE `JpaToscaCapabilityAssignment_ATTRIBUTES` (
                                           `name` varchar(120) DEFAULT NULL,
 `version` varchar(20) DEFAULT NULL,
  `ATTRIBUTES` longtext DEFAULT NULL,
`ATTRIBUTES_KEY` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 |
+-----------------------------------------+-------------------------------------------------------------------------------------------+

Currently in controlloop database, I have not found out why foreign key has not be generated in this table and in all '_ATTRIBUTES', '_META' and '_CONSTRAINTS' tables as well.

...