FIX: improved support for @DbForeignKey(noConstraint = true) (#1527)

* FIX: improved support for DbForeignKey(noConstraint = true)

* FIX: Tests for mariadb and sqlserver

* FIX: SqlServer was still incorrect

* FIX: not ommit property for formula

* Update BeanDescriptor.java (typo fix)

fix typo column (no code change!)
This commit is contained in:
Roland Praml
2018-11-13 20:44:45 +13:00
committed by Rob Bygrave
parent 3c6a52da31
commit ce403e72a7
13 changed files with 931 additions and 11 deletions
@@ -266,6 +266,14 @@ class SqlTreeNodeBean implements SqlTreeNode {
if (id == null) {
// bean must be null...
localBean = null;
// ... but there may exist as reference bean in parent which has to be marked as deleted.
if (parentBean != null && nodeBeanProp instanceof STreePropertyAssocOne) {
contextBean = ((STreePropertyAssocOne)nodeBeanProp).getValueAsEntityBean(parentBean);
if (contextBean != null) {
desc.markAsDeleted(contextBean);
}
}
} else if (!temporalVersions) {
// check the PersistenceContext to see if the bean already exists
contextBean = (EntityBean) localDesc.contextPutIfAbsent(persistenceContext, id, localBean);