case class Instance(
@Alias("_id") var seId: String,
@Alias("_keyset") var InstanceKeyset: List[InstanceKeyset]
) extends Entity
And I initialised it using this:
new Instance(seId, List(ks1, ks2))
what I see on the logs on mysql is like this:
INSERT INTO `se_instance` (`_id`, `_keyset`) VALUES ('96050d3e-d74b-11e4-aebc-3fcfb10387e4-b61bccbc', '1');
INSERT INTO instance_keysets(....)
INSERT INTO instance_keysets(...)
delete from _keyset where owner = ....
insert into _keyset(....
insert into _keyset(....
as you can see, it deletes first all the _keyset row with the given owner and insert two row to establish the linked between Instance and InstanceKeyset.
Is this the proper behaviour?
Thanks,
- Leo B