[英]Does toplink reflect changes in the order
Does top link reflect the changes if the ordering of the elements have changed? 如果元素的顺序已更改,则顶部链接是否反映出更改? I have the below mapping :
我有以下映射:
ManyToManyMapping dummyMapping = new ManyToManyMapping();
dummyMapping.setAttributeName("dummy");
dummyMapping.setReferenceClass(Dummy.class);
dummyMapping.useBasicIndirection();
//aggregationProvidersMapping.useCollectionClass(java.util.ArrayList.class);
dummyMapping.setRelationTableName("DUMMY");
dummyMapping.addSourceRelationKeyFieldName("dummy1.ID", "dummy2.ID");
dummyMapping.addTargetRelationKeyFieldName("dummy1.ORGID", "dummy2.id");
descriptor.addMapping(dummyMapping);
What is the default collection class used if I don't specify any class via the "useCollectionClass"? 如果我没有通过“ useCollectionClass”指定任何类,则使用的默认集合类是什么?
"dummy" is using a ArrayList and hence the ordering of the elements is maintained. “虚拟”正在使用ArrayList,因此可以保持元素的顺序。 If the ordering of the elements within the "dummy" attribute has changed, [no additions or deletions], does toplink reflect these changes to the DB ?
如果“虚拟”属性中元素的顺序已更改,[无添加或删除],则toplink是否将这些更改反映到数据库?
For a ManyToManyMapping ,there is no way in which the order can be stored. 对于ManyToManyMapping,无法存储订单。 I resolved this solution by changing to OneToManyMapping.
我通过更改为OneToManyMapping解决了该解决方案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.