mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
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:
committed by
Rob Bygrave
parent
3c6a52da31
commit
ce403e72a7
@@ -498,8 +498,11 @@ public final class SqlTreeBuilder {
|
||||
|
||||
for (STreePropertyAssocOne propertyAssocOne : desc.propsOne()) {
|
||||
//noinspection StatementWithEmptyBody
|
||||
if (queryProps != null && queryProps.isIncludedBeanJoin(propertyAssocOne.getName())) {
|
||||
// if it is a joined bean... then don't add the property
|
||||
if (queryProps != null
|
||||
&& queryProps.isIncludedBeanJoin(propertyAssocOne.getName())
|
||||
&& propertyAssocOne.hasForeignKey()
|
||||
&& !propertyAssocOne.isFormula()) {
|
||||
// if it is a joined bean with FK constraint... then don't add the property
|
||||
// as it will have its own entire Node in the SqlTree
|
||||
} else {
|
||||
selectProps.add(propertyAssocOne);
|
||||
|
||||
Reference in New Issue
Block a user