diff --git a/src/main/java/com/avaje/ebeaninternal/server/deploy/meta/DeployBeanPropertyAssocOne.java b/src/main/java/com/avaje/ebeaninternal/server/deploy/meta/DeployBeanPropertyAssocOne.java index d5b36eac3..73b827257 100644 --- a/src/main/java/com/avaje/ebeaninternal/server/deploy/meta/DeployBeanPropertyAssocOne.java +++ b/src/main/java/com/avaje/ebeaninternal/server/deploy/meta/DeployBeanPropertyAssocOne.java @@ -5,30 +5,30 @@ package com.avaje.ebeaninternal.server.deploy.meta; */ public class DeployBeanPropertyAssocOne extends DeployBeanPropertyAssoc { - boolean oneToOne; - - boolean oneToOneExported; + boolean oneToOne; - DeployBeanEmbedded deployEmbedded; - - /** - * Create the property. - */ - public DeployBeanPropertyAssocOne(DeployBeanDescriptor desc, Class targetType) { - super(desc, targetType); - } + boolean oneToOneExported; - /** - * Return the deploy information specifically for the deployment - * of Embedded beans. - */ - public DeployBeanEmbedded getDeployEmbedded() { - // deployment should be single threaded - if (deployEmbedded == null){ - deployEmbedded = new DeployBeanEmbedded(); - } - return deployEmbedded; - } + DeployBeanEmbedded deployEmbedded; + + /** + * Create the property. + */ + public DeployBeanPropertyAssocOne(DeployBeanDescriptor desc, Class targetType) { + super(desc, targetType); + } + + /** + * Return the deploy information specifically for the deployment + * of Embedded beans. + */ + public DeployBeanEmbedded getDeployEmbedded() { + // deployment should be single threaded + if (deployEmbedded == null) { + deployEmbedded = new DeployBeanEmbedded(); + } + return deployEmbedded; + } /** * Return true if this has multiple properties (expected for embedded id). @@ -38,42 +38,45 @@ public class DeployBeanPropertyAssocOne extends DeployBeanPropertyAssoc { return getDeployEmbedded().getPropertyColumnMap().size() > 1; } - @Override - public String getDbColumn() { - DeployTableJoinColumn[] columns = tableJoin.columns(); - if (columns.length == 1){ - return columns[0].getLocalDbColumn(); - } - return super.getDbColumn(); + @Override + public String getDbColumn() { + DeployTableJoinColumn[] columns = tableJoin.columns(); + if (columns.length == 1) { + return columns[0].getLocalDbColumn(); } + return super.getDbColumn(); + } - /** - * Return true if this a OneToOne property. Otherwise assumed ManyToOne. - */ - public boolean isOneToOne() { - return oneToOne; - } + /** + * Return true if this a OneToOne property. Otherwise assumed ManyToOne. + */ + public boolean isOneToOne() { + return oneToOne; + } - /** - * Set to true if this is a OneToOne. - */ - public void setOneToOne() { - this.oneToOne = true; - } + /** + * Set to true if this is a OneToOne. + */ + public void setOneToOne() { + this.oneToOne = true; + } - /** - * Return true if this is the exported side of a OneToOne. - */ - public boolean isOneToOneExported() { - return oneToOneExported; - } + /** + * Return true if this is the exported side of a OneToOne. + */ + public boolean isOneToOneExported() { + return oneToOneExported; + } - /** - * Set to true if this is the exported side of a OneToOne. This means - * it doesn't 'own' the foreign key column. A OneToMany without the many. - */ - public void setOneToOneExported() { - this.oneToOneExported = true; - } + /** + * Set to true if this is the exported side of a OneToOne. This means + * it doesn't 'own' the foreign key column. A OneToMany without the many. + */ + public void setOneToOneExported() { + this.oneToOneExported = true; + } + public boolean isImportedPrimaryKey() { + return false; + } }