HHH-16918 Retain any key and discriminator (insert/updat)ability

This commit is contained in:
Marco Belladelli 2023-08-07 16:17:46 +02:00
parent f5d806623e
commit bafc2ae88e
1 changed files with 10 additions and 2 deletions

View File

@ -261,7 +261,11 @@ public class Any extends SimpleValue {
public void setDiscriminator(BasicValue discriminatorDescriptor) { public void setDiscriminator(BasicValue discriminatorDescriptor) {
this.discriminatorDescriptor = discriminatorDescriptor; this.discriminatorDescriptor = discriminatorDescriptor;
if ( discriminatorDescriptor.getColumn() instanceof Column ) { if ( discriminatorDescriptor.getColumn() instanceof Column ) {
justAddColumn( (Column) discriminatorDescriptor.getColumn() ); justAddColumn(
(Column) discriminatorDescriptor.getColumn(),
discriminatorDescriptor.isColumnInsertable( 0 ),
discriminatorDescriptor.isColumnUpdateable( 0 )
);
} }
else { else {
justAddFormula( (Formula) discriminatorDescriptor.getColumn() ); justAddFormula( (Formula) discriminatorDescriptor.getColumn() );
@ -278,7 +282,11 @@ public class Any extends SimpleValue {
public void setKey(BasicValue keyDescriptor) { public void setKey(BasicValue keyDescriptor) {
this.keyDescriptor = keyDescriptor; this.keyDescriptor = keyDescriptor;
if ( keyDescriptor.getColumn() instanceof Column ) { if ( keyDescriptor.getColumn() instanceof Column ) {
justAddColumn( (Column) keyDescriptor.getColumn() ); justAddColumn(
(Column) keyDescriptor.getColumn(),
keyDescriptor.isColumnInsertable( 0 ),
keyDescriptor.isColumnUpdateable( 0 )
);
} }
else { else {
justAddFormula( (Formula) keyDescriptor.getColumn() ); justAddFormula( (Formula) keyDescriptor.getColumn() );