mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 13:10:44 +00:00
CE-1406 in ensureRecordSecurityLockIsRepresented, getTable using table name, not a (potential) alias; avoid NPE on exposedJoins; whitespace; add cloneable in JoinOn
This commit is contained in:
@ -378,7 +378,7 @@ public class JoinsContext
|
|||||||
{
|
{
|
||||||
securityFieldTableAlias = matchedQueryJoin.getJoinTableOrItsAlias();
|
securityFieldTableAlias = matchedQueryJoin.getJoinTableOrItsAlias();
|
||||||
}
|
}
|
||||||
tmpTable = instance.getTable(securityFieldTableAlias);
|
tmpTable = instance.getTable(aliasToTableNameMap.getOrDefault(securityFieldTableAlias, securityFieldTableAlias));
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// set the baseTableOrAlias for the next iteration to be this join's joinTableOrAlias //
|
// set the baseTableOrAlias for the next iteration to be this join's joinTableOrAlias //
|
||||||
@ -1118,7 +1118,7 @@ public class JoinsContext
|
|||||||
if(useExposedJoins)
|
if(useExposedJoins)
|
||||||
{
|
{
|
||||||
QTableMetaData mainTable = QContext.getQInstance().getTable(mainTableName);
|
QTableMetaData mainTable = QContext.getQInstance().getTable(mainTableName);
|
||||||
for(ExposedJoin exposedJoin : mainTable.getExposedJoins())
|
for(ExposedJoin exposedJoin : CollectionUtils.nonNullList(mainTable.getExposedJoins()))
|
||||||
{
|
{
|
||||||
if(exposedJoin.getJoinTable().equals(joinTableName))
|
if(exposedJoin.getJoinTable().equals(joinTableName))
|
||||||
{
|
{
|
||||||
@ -1159,6 +1159,7 @@ public class JoinsContext
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
**
|
**
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
@ -26,7 +26,7 @@ package com.kingsrook.qqq.backend.core.model.metadata.joins;
|
|||||||
** Specification for (at least part of) how two tables join together - e.g.,
|
** Specification for (at least part of) how two tables join together - e.g.,
|
||||||
** leftField = rightField. Used as part of a list in a QJoinMetaData.
|
** leftField = rightField. Used as part of a list in a QJoinMetaData.
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
public class JoinOn
|
public class JoinOn implements Cloneable
|
||||||
{
|
{
|
||||||
private String leftField;
|
private String leftField;
|
||||||
private String rightField;
|
private String rightField;
|
||||||
@ -131,4 +131,22 @@ public class JoinOn
|
|||||||
return (this);
|
return (this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
**
|
||||||
|
*******************************************************************************/
|
||||||
|
@Override
|
||||||
|
public JoinOn clone()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
JoinOn clone = (JoinOn) super.clone();
|
||||||
|
return clone;
|
||||||
|
}
|
||||||
|
catch(CloneNotSupportedException e)
|
||||||
|
{
|
||||||
|
throw new AssertionError();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user