mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-26 23:22:57 +00:00
Merge branch 'master' of github.com:ebean-orm/ebean
This commit is contained in:
commit
acd6ba0a42
50 files changed
+67
-53
No files matched your search
@@ -11,17 +11,13 @@ import io.ebean.text.json.JsonContext;
|
|||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import javax.persistence.NonUniqueResultException;
|
|
||||||
import javax.persistence.OptimisticLockException;
|
import javax.persistence.OptimisticLockException;
|
||||||
import javax.persistence.PersistenceException;
|
import javax.persistence.PersistenceException;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Optional;
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
import java.util.function.Consumer;
|
|
||||||
import java.util.function.Predicate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides the API for fetching and saving beans to a particular DataSource.
|
* Provides the API for fetching and saving beans to a particular DataSource.
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ public class MergeOptionsBuilder {
|
|||||||
this.deletePermanent = deletePermanent;
|
this.deletePermanent = deletePermanent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Set<String> paths() {
|
public Set<String> paths() {
|
||||||
return paths;
|
return paths;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package io.ebean;
|
|||||||
|
|
||||||
import io.ebean.bean.EntityBean;
|
import io.ebean.bean.EntityBean;
|
||||||
|
|
||||||
import javax.persistence.MappedSuperclass;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A MappedSuperclass base class that provides convenience methods for inserting, updating and
|
* A MappedSuperclass base class that provides convenience methods for inserting, updating and
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ package io.ebean.config;
|
|||||||
*/
|
*/
|
||||||
public class BeanNotEnhancedException extends IllegalStateException {
|
public class BeanNotEnhancedException extends IllegalStateException {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 3008101919425876799L;
|
||||||
|
|
||||||
public BeanNotEnhancedException(String msg) {
|
public BeanNotEnhancedException(String msg) {
|
||||||
super(msg);
|
super(msg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ package io.ebean.config;
|
|||||||
*/
|
*/
|
||||||
public class BeanNotRegisteredException extends IllegalStateException {
|
public class BeanNotRegisteredException extends IllegalStateException {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -1411298126011136552L;
|
||||||
|
|
||||||
public BeanNotRegisteredException(String msg) {
|
public BeanNotRegisteredException(String msg) {
|
||||||
super(msg);
|
super(msg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ public interface SpiDtoQuery<T> extends DtoQuery<T>, SpiSqlBinding {
|
|||||||
/**
|
/**
|
||||||
* Return the label for the query.
|
* Return the label for the query.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
String getLabel();
|
String getLabel();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import io.ebean.bean.PersistenceContext;
|
|||||||
import io.ebean.event.changelog.BeanChange;
|
import io.ebean.event.changelog.BeanChange;
|
||||||
import io.ebean.event.changelog.ChangeSet;
|
import io.ebean.event.changelog.ChangeSet;
|
||||||
import io.ebeaninternal.server.core.PersistDeferredRelationship;
|
import io.ebeaninternal.server.core.PersistDeferredRelationship;
|
||||||
import io.ebeaninternal.server.core.PersistRequest;
|
|
||||||
import io.ebeaninternal.server.core.PersistRequestBean;
|
import io.ebeaninternal.server.core.PersistRequestBean;
|
||||||
import io.ebeaninternal.server.persist.BatchControl;
|
import io.ebeaninternal.server.persist.BatchControl;
|
||||||
import io.ebeaninternal.server.transaction.ProfileStream;
|
import io.ebeaninternal.server.transaction.ProfileStream;
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import io.ebean.bean.PersistenceContext;
|
|||||||
import io.ebean.event.changelog.BeanChange;
|
import io.ebean.event.changelog.BeanChange;
|
||||||
import io.ebean.event.changelog.ChangeSet;
|
import io.ebean.event.changelog.ChangeSet;
|
||||||
import io.ebeaninternal.server.core.PersistDeferredRelationship;
|
import io.ebeaninternal.server.core.PersistDeferredRelationship;
|
||||||
import io.ebeaninternal.server.core.PersistRequest;
|
|
||||||
import io.ebeaninternal.server.core.PersistRequestBean;
|
import io.ebeaninternal.server.core.PersistRequestBean;
|
||||||
import io.ebeaninternal.server.persist.BatchControl;
|
import io.ebeaninternal.server.persist.BatchControl;
|
||||||
import io.ebeaninternal.server.transaction.ProfileStream;
|
import io.ebeaninternal.server.transaction.ProfileStream;
|
||||||
|
|||||||
@@ -909,7 +909,7 @@ public class BaseTableDdl implements TableDdl {
|
|||||||
if (hasValue(ddl)) {
|
if (hasValue(ddl)) {
|
||||||
writer.apply().append(ddl).endOfStatement();
|
writer.apply().append(ddl).endOfStatement();
|
||||||
|
|
||||||
if (isTrue(alter.isWithHistory()) && alter.getType() != null && historySupport == historySupport.TRIGGER_BASED) {
|
if (isTrue(alter.isWithHistory()) && alter.getType() != null && historySupport == HistorySupport.TRIGGER_BASED) {
|
||||||
// mysql and sql server column type change allowing nulls in the history table column
|
// mysql and sql server column type change allowing nulls in the history table column
|
||||||
regenerateHistoryTriggers(alter.getTableName(), HistoryTableUpdate.Change.ALTER, alter.getColumnName());
|
regenerateHistoryTriggers(alter.getTableName(), HistoryTableUpdate.Change.ALTER, alter.getColumnName());
|
||||||
AlterColumn alterHistoryColumn = new AlterColumn();
|
AlterColumn alterHistoryColumn = new AlterColumn();
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package io.ebeaninternal.dbmigration.model;
|
package io.ebeaninternal.dbmigration.model;
|
||||||
|
|
||||||
import io.ebean.annotation.PartitionMode;
|
|
||||||
import io.ebeaninternal.dbmigration.ddlgeneration.platform.DdlHelp;
|
import io.ebeaninternal.dbmigration.ddlgeneration.platform.DdlHelp;
|
||||||
import io.ebeaninternal.dbmigration.ddlgeneration.platform.SplitColumns;
|
import io.ebeaninternal.dbmigration.ddlgeneration.platform.SplitColumns;
|
||||||
import io.ebeaninternal.dbmigration.migration.AddColumn;
|
import io.ebeaninternal.dbmigration.migration.AddColumn;
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ public class DefaultServerQueryCache extends DefaultServerCache {
|
|||||||
this.queryCacheEntryValidate = config.getQueryCacheEntryValidate();
|
this.queryCacheEntryValidate = config.getQueryCacheEntryValidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
protected Object unwrapEntry(CacheEntry entry) {
|
protected Object unwrapEntry(CacheEntry entry) {
|
||||||
return ((QueryCacheEntry) entry.getValue()).getValue();
|
return ((QueryCacheEntry) entry.getValue()).getValue();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ public class ClusterManager implements ServerLookup {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public EbeanServer getServer(String name) {
|
public EbeanServer getServer(String name) {
|
||||||
synchronized (monitor) {
|
synchronized (monitor) {
|
||||||
return serverMap.get(name);
|
return serverMap.get(name);
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import io.ebeaninternal.api.SpiTransaction;
|
|||||||
import io.ebeaninternal.server.lib.util.Str;
|
import io.ebeaninternal.server.lib.util.Str;
|
||||||
import io.ebeaninternal.server.persist.Binder;
|
import io.ebeaninternal.server.persist.Binder;
|
||||||
import io.ebeaninternal.server.persist.TrimLogSql;
|
import io.ebeaninternal.server.persist.TrimLogSql;
|
||||||
import io.ebeaninternal.server.transaction.TransactionManager;
|
|
||||||
import io.ebeaninternal.server.util.BindParamsParser;
|
import io.ebeaninternal.server.util.BindParamsParser;
|
||||||
|
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
|
|||||||
@@ -239,6 +239,7 @@ public final class DefaultSqlUpdate implements Serializable, SpiSqlUpdate {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public SqlUpdate setNextParameter(Object value) {
|
public SqlUpdate setNextParameter(Object value) {
|
||||||
setParameter(++addPos, value);
|
setParameter(++addPos, value);
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ abstract class BaseCollectionHelp<T> implements BeanCollectionHelp<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("rawtypes")
|
||||||
@Override
|
@Override
|
||||||
public Collection underlying(Object value) {
|
public Collection underlying(Object value) {
|
||||||
if (value instanceof BeanCollection) {
|
if (value instanceof BeanCollection) {
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ public interface BeanCollectionHelp<T> extends CQueryCollectionAdd<T> {
|
|||||||
/**
|
/**
|
||||||
* Create an empty collection of the correct type without a parent bean.
|
* Create an empty collection of the correct type without a parent bean.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
BeanCollection<T> createEmptyNoParent();
|
BeanCollection<T> createEmptyNoParent();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -49,6 +50,7 @@ public interface BeanCollectionHelp<T> extends CQueryCollectionAdd<T> {
|
|||||||
/**
|
/**
|
||||||
* Add a bean to the List Set or Map.
|
* Add a bean to the List Set or Map.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
void add(BeanCollection<?> collection, EntityBean bean, boolean withCheck);
|
void add(BeanCollection<?> collection, EntityBean bean, boolean withCheck);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1834,6 +1834,7 @@ public class BeanDescriptor<T> implements BeanType<T>, STreeType {
|
|||||||
/**
|
/**
|
||||||
* Return the IdBinder which is helpful for handling the various types of Id.
|
* Return the IdBinder which is helpful for handling the various types of Id.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IdBinder getIdBinder() {
|
public IdBinder getIdBinder() {
|
||||||
return idBinder;
|
return idBinder;
|
||||||
}
|
}
|
||||||
@@ -1942,6 +1943,7 @@ public class BeanDescriptor<T> implements BeanType<T>, STreeType {
|
|||||||
/**
|
/**
|
||||||
* Creates a new entity bean without invoking {@link BeanPostConstructListener#postCreate(Object)}
|
* Creates a new entity bean without invoking {@link BeanPostConstructListener#postCreate(Object)}
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public EntityBean createEntityBean() {
|
public EntityBean createEntityBean() {
|
||||||
return createEntityBean(false);
|
return createEntityBean(false);
|
||||||
}
|
}
|
||||||
@@ -2212,6 +2214,7 @@ public class BeanDescriptor<T> implements BeanType<T>, STreeType {
|
|||||||
/**
|
/**
|
||||||
* Put the bean into the persistence context if it is absent.
|
* Put the bean into the persistence context if it is absent.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Object contextPutIfAbsent(PersistenceContext pc, Object id, EntityBean localBean) {
|
public Object contextPutIfAbsent(PersistenceContext pc, Object id, EntityBean localBean) {
|
||||||
return pc.putIfAbsent(rootBeanType, id, localBean);
|
return pc.putIfAbsent(rootBeanType, id, localBean);
|
||||||
}
|
}
|
||||||
@@ -2638,6 +2641,7 @@ public class BeanDescriptor<T> implements BeanType<T>, STreeType {
|
|||||||
return autoTunable;
|
return autoTunable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isElementType() {
|
public boolean isElementType() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -2646,6 +2650,7 @@ public class BeanDescriptor<T> implements BeanType<T>, STreeType {
|
|||||||
* Returns the Inheritance mapping information. This will be null if this type
|
* Returns the Inheritance mapping information. This will be null if this type
|
||||||
* of bean is not involved in any ORM inheritance mapping.
|
* of bean is not involved in any ORM inheritance mapping.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public InheritInfo getInheritInfo() {
|
public InheritInfo getInheritInfo() {
|
||||||
return inheritInfo;
|
return inheritInfo;
|
||||||
}
|
}
|
||||||
@@ -2814,6 +2819,7 @@ public class BeanDescriptor<T> implements BeanType<T>, STreeType {
|
|||||||
/**
|
/**
|
||||||
* Returns true if this bean is based on RawSql.
|
* Returns true if this bean is based on RawSql.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isRawSqlBased() {
|
public boolean isRawSqlBased() {
|
||||||
return EntityType.SQL == entityType;
|
return EntityType.SQL == entityType;
|
||||||
}
|
}
|
||||||
@@ -2868,6 +2874,7 @@ public class BeanDescriptor<T> implements BeanType<T>, STreeType {
|
|||||||
/**
|
/**
|
||||||
* Return the base table to use given the query temporal mode.
|
* Return the base table to use given the query temporal mode.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getBaseTable(SpiQuery.TemporalMode mode) {
|
public String getBaseTable(SpiQuery.TemporalMode mode) {
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case DRAFT:
|
case DRAFT:
|
||||||
@@ -2895,6 +2902,7 @@ public class BeanDescriptor<T> implements BeanType<T>, STreeType {
|
|||||||
return readAuditing;
|
return readAuditing;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isSoftDelete() {
|
public boolean isSoftDelete() {
|
||||||
return softDelete;
|
return softDelete;
|
||||||
}
|
}
|
||||||
@@ -2907,6 +2915,7 @@ public class BeanDescriptor<T> implements BeanType<T>, STreeType {
|
|||||||
return softDeleteProperty.getSoftDeleteDbSet();
|
return softDeleteProperty.getSoftDeleteDbSet();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getSoftDeletePredicate(String tableAlias) {
|
public String getSoftDeletePredicate(String tableAlias) {
|
||||||
return softDeleteProperty.getSoftDeleteDbPredicate(tableAlias);
|
return softDeleteProperty.getSoftDeleteDbPredicate(tableAlias);
|
||||||
}
|
}
|
||||||
@@ -2979,6 +2988,7 @@ public class BeanDescriptor<T> implements BeanType<T>, STreeType {
|
|||||||
* Set the draft to true for this entity bean instance.
|
* Set the draft to true for this entity bean instance.
|
||||||
* This bean is being loaded via asDraft() query.
|
* This bean is being loaded via asDraft() query.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setDraft(EntityBean entityBean) {
|
public void setDraft(EntityBean entityBean) {
|
||||||
if (draft != null) {
|
if (draft != null) {
|
||||||
draft.setValue(entityBean, true);
|
draft.setValue(entityBean, true);
|
||||||
@@ -3032,6 +3042,7 @@ public class BeanDescriptor<T> implements BeanType<T>, STreeType {
|
|||||||
/**
|
/**
|
||||||
* Return true if this entity bean has history support.
|
* Return true if this entity bean has history support.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isHistorySupport() {
|
public boolean isHistorySupport() {
|
||||||
return historySupport;
|
return historySupport;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ class BeanDescriptorElementEmbedded<T> extends BeanDescriptorElement<T> {
|
|||||||
return (EntityBean)prototype._ebean_newInstance();
|
return (EntityBean)prototype._ebean_newInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void bindElementValue(SqlUpdate insert, Object value) {
|
public void bindElementValue(SqlUpdate insert, Object value) {
|
||||||
targetDescriptor.bindElementValue(insert, value);
|
targetDescriptor.bindElementValue(insert, value);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ class BeanDescriptorElementScalar<T> extends BeanDescriptorElement<T> {
|
|||||||
this.scalarType = firstBaseScalarType();
|
this.scalarType = firstBaseScalarType();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void bindElementValue(SqlUpdate insert, Object value) {
|
public void bindElementValue(SqlUpdate insert, Object value) {
|
||||||
insert.setNextParameter(value);
|
insert.setNextParameter(value);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1014,7 +1014,6 @@ public class BeanDescriptorManager implements BeanDescriptorMap {
|
|||||||
* into the order_id column on the order_lines table).
|
* into the order_id column on the order_lines table).
|
||||||
* </p>
|
* </p>
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
|
||||||
private void makeUnidirectional(DeployBeanPropertyAssocMany<?> oneToMany) {
|
private void makeUnidirectional(DeployBeanPropertyAssocMany<?> oneToMany) {
|
||||||
|
|
||||||
DeployBeanDescriptor<?> targetDesc = getTargetDescriptor(oneToMany);
|
DeployBeanDescriptor<?> targetDesc = getTargetDescriptor(oneToMany);
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package io.ebeaninternal.server.deploy;
|
|||||||
import io.ebean.config.BeanNotRegisteredException;
|
import io.ebean.config.BeanNotRegisteredException;
|
||||||
import io.ebeaninternal.server.deploy.meta.DeployBeanPropertyAssocOne;
|
import io.ebeaninternal.server.deploy.meta.DeployBeanPropertyAssocOne;
|
||||||
|
|
||||||
import javax.persistence.PersistenceException;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -292,6 +292,7 @@ public abstract class BeanPropertyAssoc<T> extends BeanProperty implements STree
|
|||||||
* Return an extra clause to add to the query for loading or joining
|
* Return an extra clause to add to the query for loading or joining
|
||||||
* to this bean type.
|
* to this bean type.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getExtraWhere() {
|
public String getExtraWhere() {
|
||||||
return extraWhere;
|
return extraWhere;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -255,6 +255,7 @@ public class BeanPropertyAssocMany<T> extends BeanPropertyAssoc<T> implements ST
|
|||||||
/**
|
/**
|
||||||
* Add the bean to the appropriate collection on the parent bean.
|
* Add the bean to the appropriate collection on the parent bean.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void addBeanToCollectionWithCreate(EntityBean parentBean, EntityBean detailBean, boolean withCheck) {
|
public void addBeanToCollectionWithCreate(EntityBean parentBean, EntityBean detailBean, boolean withCheck) {
|
||||||
BeanCollection<?> bc = (BeanCollection<?>) super.getValue(parentBean);
|
BeanCollection<?> bc = (BeanCollection<?>) super.getValue(parentBean);
|
||||||
if (bc == null) {
|
if (bc == null) {
|
||||||
@@ -538,6 +539,7 @@ public class BeanPropertyAssocMany<T> extends BeanPropertyAssoc<T> implements ST
|
|||||||
/**
|
/**
|
||||||
* Return true if this is many to many.
|
* Return true if this is many to many.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean hasJoinTable() {
|
public boolean hasJoinTable() {
|
||||||
return manyToMany || o2mJoinTable;
|
return manyToMany || o2mJoinTable;
|
||||||
}
|
}
|
||||||
@@ -563,6 +565,7 @@ public class BeanPropertyAssocMany<T> extends BeanPropertyAssoc<T> implements ST
|
|||||||
/**
|
/**
|
||||||
* ManyToMany only, join from local table to intersection table.
|
* ManyToMany only, join from local table to intersection table.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public TableJoin getIntersectionTableJoin() {
|
public TableJoin getIntersectionTableJoin() {
|
||||||
return intersectionJoin;
|
return intersectionJoin;
|
||||||
}
|
}
|
||||||
@@ -606,6 +609,7 @@ public class BeanPropertyAssocMany<T> extends BeanPropertyAssoc<T> implements ST
|
|||||||
return mapKey;
|
return mapKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public BeanCollection<?> createReferenceIfNull(EntityBean parentBean) {
|
public BeanCollection<?> createReferenceIfNull(EntityBean parentBean) {
|
||||||
|
|
||||||
Object v = getValue(parentBean);
|
Object v = getValue(parentBean);
|
||||||
@@ -638,6 +642,7 @@ public class BeanPropertyAssocMany<T> extends BeanPropertyAssoc<T> implements ST
|
|||||||
return descriptor.getId(parentBean);
|
return descriptor.getId(parentBean);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void addSelectExported(DbSqlContext ctx, String tableAlias) {
|
public void addSelectExported(DbSqlContext ctx, String tableAlias) {
|
||||||
|
|
||||||
String alias = hasJoinTable() ? "int_" : tableAlias;
|
String alias = hasJoinTable() ? "int_" : tableAlias;
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import io.ebean.bean.EntityBeanIntercept;
|
|||||||
|
|
||||||
class ElementEntityBean implements EntityBean {
|
class ElementEntityBean implements EntityBean {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 8742536671024715601L;
|
||||||
|
|
||||||
private final String[] properties;
|
private final String[] properties;
|
||||||
|
|
||||||
private Object[] data;
|
private Object[] data;
|
||||||
|
|||||||
@@ -517,6 +517,7 @@ public class DefaultExpressionList<T> implements SpiExpressionList<T> {
|
|||||||
return query.setUseQueryCache(useCache);
|
return query.setUseQueryCache(useCache);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Query<T> setCountDistinct(CountDistinctOrder orderBy) {
|
public Query<T> setCountDistinct(CountDistinctOrder orderBy) {
|
||||||
return query.setCountDistinct(orderBy);
|
return query.setCountDistinct(orderBy);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import io.ebeaninternal.api.SpiTransaction;
|
|||||||
import io.ebeaninternal.server.core.PersistRequestCallableSql;
|
import io.ebeaninternal.server.core.PersistRequestCallableSql;
|
||||||
import io.ebeaninternal.server.util.BindParamsParser;
|
import io.ebeaninternal.server.util.BindParamsParser;
|
||||||
|
|
||||||
import javax.persistence.PersistenceException;
|
|
||||||
import java.sql.CallableStatement;
|
import java.sql.CallableStatement;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ class MergeNodeAssocManyToMany extends MergeNode {
|
|||||||
this.many = property;
|
this.many = property;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void merge(MergeRequest request) {
|
public void merge(MergeRequest request) {
|
||||||
|
|
||||||
EntityBean parentBean = request.getBean();
|
EntityBean parentBean = request.getBean();
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ class MergeNodeAssocOne extends MergeNode {
|
|||||||
this.one = property;
|
this.one = property;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void merge(MergeRequest request) {
|
public void merge(MergeRequest request) {
|
||||||
|
|
||||||
EntityBean entityBean = getEntityBean(request.getBean());
|
EntityBean entityBean = getEntityBean(request.getBean());
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import io.ebean.bean.EntityBean;
|
|||||||
import io.ebeaninternal.server.deploy.BeanPropertyAssocMany;
|
import io.ebeaninternal.server.deploy.BeanPropertyAssocMany;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -19,6 +18,7 @@ class MergeNodeAssocOneToMany extends MergeNode {
|
|||||||
this.many = property;
|
this.many = property;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void merge(MergeRequest request) {
|
public void merge(MergeRequest request) {
|
||||||
|
|
||||||
Collection beans = many.getRawCollection(request.getBean());
|
Collection beans = many.getRawCollection(request.getBean());
|
||||||
|
|||||||
@@ -15,9 +15,7 @@ import io.ebeaninternal.server.persist.Binder;
|
|||||||
|
|
||||||
import javax.persistence.PersistenceException;
|
import javax.persistence.PersistenceException;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import io.ebeaninternal.server.deploy.DbSqlContext;
|
|||||||
|
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
final class SqlTreeNodeManyRoot extends SqlTreeNodeBean {
|
final class SqlTreeNodeManyRoot extends SqlTreeNodeBean {
|
||||||
|
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ public class DefaultDtoQuery<T> implements SpiDtoQuery<T> {
|
|||||||
return descriptor.getType();
|
return descriptor.getType();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public SpiQuery<?> getOrmQuery() {
|
public SpiQuery<?> getOrmQuery() {
|
||||||
return ormQuery;
|
return ormQuery;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package io.ebeaninternal.server.transaction;
|
|||||||
import io.ebeaninternal.server.core.PersistRequest;
|
import io.ebeaninternal.server.core.PersistRequest;
|
||||||
import io.ebeaninternal.server.deploy.BeanDescriptor;
|
import io.ebeaninternal.server.deploy.BeanDescriptor;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import io.ebeaninternal.api.SpiTransaction;
|
|||||||
import io.ebeaninternal.api.TransactionEvent;
|
import io.ebeaninternal.api.TransactionEvent;
|
||||||
import io.ebeaninternal.api.TxnProfileEventCodes;
|
import io.ebeaninternal.api.TxnProfileEventCodes;
|
||||||
import io.ebeaninternal.server.core.PersistDeferredRelationship;
|
import io.ebeaninternal.server.core.PersistDeferredRelationship;
|
||||||
import io.ebeaninternal.server.core.PersistRequest;
|
|
||||||
import io.ebeaninternal.server.core.PersistRequestBean;
|
import io.ebeaninternal.server.core.PersistRequestBean;
|
||||||
import io.ebeaninternal.server.persist.BatchControl;
|
import io.ebeaninternal.server.persist.BatchControl;
|
||||||
import io.ebeanservice.docstore.api.DocStoreTransaction;
|
import io.ebeanservice.docstore.api.DocStoreTransaction;
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import io.ebeaninternal.api.SpiProfileTransactionEvent;
|
|||||||
import io.ebeaninternal.api.SpiTransaction;
|
import io.ebeaninternal.api.SpiTransaction;
|
||||||
import io.ebeaninternal.api.TransactionEvent;
|
import io.ebeaninternal.api.TransactionEvent;
|
||||||
import io.ebeaninternal.server.core.PersistDeferredRelationship;
|
import io.ebeaninternal.server.core.PersistDeferredRelationship;
|
||||||
import io.ebeaninternal.server.core.PersistRequest;
|
|
||||||
import io.ebeaninternal.server.core.PersistRequestBean;
|
import io.ebeaninternal.server.core.PersistRequestBean;
|
||||||
import io.ebeaninternal.server.persist.BatchControl;
|
import io.ebeaninternal.server.persist.BatchControl;
|
||||||
import io.ebeanservice.docstore.api.DocStoreTransaction;
|
import io.ebeanservice.docstore.api.DocStoreTransaction;
|
||||||
|
|||||||
+11
-12
@@ -17,7 +17,6 @@ import org.junit.Test;
|
|||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
import static org.junit.Assert.assertNull;
|
import static org.junit.Assert.assertNull;
|
||||||
import static org.junit.Assert.assertThat;
|
|
||||||
import static org.junit.Assert.assertTrue;
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
public class PlatformDdl_AlterColumnTest {
|
public class PlatformDdl_AlterColumnTest {
|
||||||
@@ -67,7 +66,7 @@ public class PlatformDdl_AlterColumnTest {
|
|||||||
assertThat(pgDdl.convertArrayType("varchar[]")).isEqualTo("varchar[]");
|
assertThat(pgDdl.convertArrayType("varchar[]")).isEqualTo("varchar[]");
|
||||||
assertThat(pgDdl.convertArrayType("integer[]")).isEqualTo("integer[]");
|
assertThat(pgDdl.convertArrayType("integer[]")).isEqualTo("integer[]");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void convertArrayType_hana() {
|
public void convertArrayType_hana() {
|
||||||
assertThat(hanaDdl.convertArrayType("varchar[](90)")).isEqualTo("nvarchar(255) array(90)");
|
assertThat(hanaDdl.convertArrayType("varchar[](90)")).isEqualTo("nvarchar(255) array(90)");
|
||||||
@@ -89,14 +88,14 @@ public class PlatformDdl_AlterColumnTest {
|
|||||||
|
|
||||||
sql = sqlServerDdl.alterColumnBaseAttributes(alterColumn);
|
sql = sqlServerDdl.alterColumnBaseAttributes(alterColumn);
|
||||||
assertEquals("alter table mytab alter column acol nvarchar(5) not null", sql);
|
assertEquals("alter table mytab alter column acol nvarchar(5) not null", sql);
|
||||||
|
|
||||||
sql = hanaDdl.alterColumnBaseAttributes(alterColumn);
|
sql = hanaDdl.alterColumnBaseAttributes(alterColumn);
|
||||||
assertEquals("alter table mytab alter ( acol nvarchar(5) not null)", sql);
|
assertEquals("alter table mytab alter ( acol nvarchar(5) not null)", sql);
|
||||||
|
|
||||||
alterColumn.setNotnull(Boolean.FALSE);
|
alterColumn.setNotnull(Boolean.FALSE);
|
||||||
sql = mysqlDdl.alterColumnBaseAttributes(alterColumn);
|
sql = mysqlDdl.alterColumnBaseAttributes(alterColumn);
|
||||||
assertEquals("alter table mytab modify acol varchar(5)", sql);
|
assertEquals("alter table mytab modify acol varchar(5)", sql);
|
||||||
|
|
||||||
sql = hanaDdl.alterColumnBaseAttributes(alterColumn);
|
sql = hanaDdl.alterColumnBaseAttributes(alterColumn);
|
||||||
assertEquals("alter table mytab alter ( acol nvarchar(5))", sql);
|
assertEquals("alter table mytab alter ( acol nvarchar(5))", sql);
|
||||||
|
|
||||||
@@ -105,14 +104,14 @@ public class PlatformDdl_AlterColumnTest {
|
|||||||
|
|
||||||
sql = mysqlDdl.alterColumnBaseAttributes(alterColumn);
|
sql = mysqlDdl.alterColumnBaseAttributes(alterColumn);
|
||||||
assertEquals("alter table mytab modify acol varchar(100)", sql);
|
assertEquals("alter table mytab modify acol varchar(100)", sql);
|
||||||
|
|
||||||
sql = hanaDdl.alterColumnBaseAttributes(alterColumn);
|
sql = hanaDdl.alterColumnBaseAttributes(alterColumn);
|
||||||
assertEquals("alter table mytab alter ( acol nvarchar(100))", sql);
|
assertEquals("alter table mytab alter ( acol nvarchar(100))", sql);
|
||||||
|
|
||||||
alterColumn.setCurrentNotnull(Boolean.TRUE);
|
alterColumn.setCurrentNotnull(Boolean.TRUE);
|
||||||
sql = mysqlDdl.alterColumnBaseAttributes(alterColumn);
|
sql = mysqlDdl.alterColumnBaseAttributes(alterColumn);
|
||||||
assertEquals("alter table mytab modify acol varchar(100) not null", sql);
|
assertEquals("alter table mytab modify acol varchar(100) not null", sql);
|
||||||
|
|
||||||
sql = hanaDdl.alterColumnBaseAttributes(alterColumn);
|
sql = hanaDdl.alterColumnBaseAttributes(alterColumn);
|
||||||
assertEquals("alter table mytab alter ( acol nvarchar(100) not null)", sql);
|
assertEquals("alter table mytab alter ( acol nvarchar(100) not null)", sql);
|
||||||
}
|
}
|
||||||
@@ -134,7 +133,7 @@ public class PlatformDdl_AlterColumnTest {
|
|||||||
|
|
||||||
sql = sqlServerDdl.alterColumnType("mytab", "acol", "varchar(20)");
|
sql = sqlServerDdl.alterColumnType("mytab", "acol", "varchar(20)");
|
||||||
assertNull(sql);
|
assertNull(sql);
|
||||||
|
|
||||||
sql = hanaDdl.alterColumnType("mytab", "acol", "varchar(20)");
|
sql = hanaDdl.alterColumnType("mytab", "acol", "varchar(20)");
|
||||||
assertNull(sql);
|
assertNull(sql);
|
||||||
}
|
}
|
||||||
@@ -156,7 +155,7 @@ public class PlatformDdl_AlterColumnTest {
|
|||||||
|
|
||||||
sql = sqlServerDdl.alterColumnNotnull("mytab", "acol", true);
|
sql = sqlServerDdl.alterColumnNotnull("mytab", "acol", true);
|
||||||
assertNull(sql);
|
assertNull(sql);
|
||||||
|
|
||||||
sql = hanaDdl.alterColumnNotnull("mytab", "acol", true);
|
sql = hanaDdl.alterColumnNotnull("mytab", "acol", true);
|
||||||
assertNull(sql);
|
assertNull(sql);
|
||||||
}
|
}
|
||||||
@@ -178,7 +177,7 @@ public class PlatformDdl_AlterColumnTest {
|
|||||||
|
|
||||||
sql = sqlServerDdl.alterColumnNotnull("mytab", "acol", false);
|
sql = sqlServerDdl.alterColumnNotnull("mytab", "acol", false);
|
||||||
assertNull(sql);
|
assertNull(sql);
|
||||||
|
|
||||||
sql = hanaDdl.alterColumnNotnull("mytab", "acol", false);
|
sql = hanaDdl.alterColumnNotnull("mytab", "acol", false);
|
||||||
assertNull(sql);
|
assertNull(sql);
|
||||||
}
|
}
|
||||||
@@ -200,7 +199,7 @@ public class PlatformDdl_AlterColumnTest {
|
|||||||
|
|
||||||
sql = sqlServerDdl.alterColumnDefaultValue("mytab", "acol", "'hi'");
|
sql = sqlServerDdl.alterColumnDefaultValue("mytab", "acol", "'hi'");
|
||||||
assertEquals("alter table mytab add default 'hi' for acol", sql);
|
assertEquals("alter table mytab add default 'hi' for acol", sql);
|
||||||
|
|
||||||
boolean exceptionCaught = false;
|
boolean exceptionCaught = false;
|
||||||
try {
|
try {
|
||||||
hanaDdl.alterColumnDefaultValue("mytab", "acol", "'hi'");
|
hanaDdl.alterColumnDefaultValue("mytab", "acol", "'hi'");
|
||||||
@@ -228,7 +227,7 @@ public class PlatformDdl_AlterColumnTest {
|
|||||||
|
|
||||||
sql = sqlServerDdl.alterColumnDefaultValue("mytab", "acol", "DROP DEFAULT");
|
sql = sqlServerDdl.alterColumnDefaultValue("mytab", "acol", "DROP DEFAULT");
|
||||||
assertEquals("EXEC usp_ebean_drop_default_constraint mytab, acol", sql);
|
assertEquals("EXEC usp_ebean_drop_default_constraint mytab, acol", sql);
|
||||||
|
|
||||||
boolean exceptionCaught = false;
|
boolean exceptionCaught = false;
|
||||||
try {
|
try {
|
||||||
hanaDdl.alterColumnDefaultValue("mytab", "acol", "DROP DEFAULT");
|
hanaDdl.alterColumnDefaultValue("mytab", "acol", "DROP DEFAULT");
|
||||||
@@ -277,7 +276,7 @@ public class PlatformDdl_AlterColumnTest {
|
|||||||
assertEquals(oraDdl.useIdentityType(IdentityType.GENERATOR), IdType.GENERATOR);
|
assertEquals(oraDdl.useIdentityType(IdentityType.GENERATOR), IdType.GENERATOR);
|
||||||
assertEquals(oraDdl.useIdentityType(IdentityType.EXTERNAL), IdType.EXTERNAL);
|
assertEquals(oraDdl.useIdentityType(IdentityType.EXTERNAL), IdType.EXTERNAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void useIdentityType_hana() {
|
public void useIdentityType_hana() {
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,6 @@ import org.tests.model.basic.ResetBasicData;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.xml.ws.RequestWrapper;
|
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
public class EqlParserTest extends BaseTestCase {
|
public class EqlParserTest extends BaseTestCase {
|
||||||
@@ -140,7 +138,7 @@ public class EqlParserTest extends BaseTestCase {
|
|||||||
|
|
||||||
assertThat(query.getGeneratedSql()).contains("where (t0.name = ? or (t0.status = ? and t0.smallnote is null ) )");
|
assertThat(query.getGeneratedSql()).contains("where (t0.name = ? or (t0.status = ? and t0.smallnote is null ) )");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ForPlatform(Platform.HANA)
|
@ForPlatform(Platform.HANA)
|
||||||
public void where_or1_hana() {
|
public void where_or1_hana() {
|
||||||
@@ -160,7 +158,7 @@ public class EqlParserTest extends BaseTestCase {
|
|||||||
|
|
||||||
assertThat(query.getGeneratedSql()).contains("where ((t0.name = ? or t0.status = ? ) and t0.smallnote is null )");
|
assertThat(query.getGeneratedSql()).contains("where ((t0.name = ? or t0.status = ? ) and t0.smallnote is null )");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ForPlatform(Platform.HANA)
|
@ForPlatform(Platform.HANA)
|
||||||
public void where_or2_hana() {
|
public void where_or2_hana() {
|
||||||
@@ -187,7 +185,7 @@ public class EqlParserTest extends BaseTestCase {
|
|||||||
query.findList();
|
query.findList();
|
||||||
assertThat(query.getGeneratedSql()).contains("where not (t0.name = ? and t0.status = ? )");
|
assertThat(query.getGeneratedSql()).contains("where not (t0.name = ? and t0.status = ? )");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ForPlatform(Platform.HANA)
|
@ForPlatform(Platform.HANA)
|
||||||
public void test_simplifyExpressions_hana() {
|
public void test_simplifyExpressions_hana() {
|
||||||
|
|||||||
@@ -109,7 +109,11 @@ public class TypeReflectHelperTest {
|
|||||||
|
|
||||||
private static class Some {
|
private static class Some {
|
||||||
|
|
||||||
|
// note: values are accessed via reflection
|
||||||
|
@SuppressWarnings("unused")
|
||||||
List<? extends Order.Status> wildOrderStatus = new ArrayList<>();
|
List<? extends Order.Status> wildOrderStatus = new ArrayList<>();
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
List<Order.Status> orderStatus = new ArrayList<>();
|
List<Order.Status> orderStatus = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package org;
|
package org;
|
||||||
|
|
||||||
import io.ebean.Ebean;
|
|
||||||
import io.ebean.EbeanServer;
|
import io.ebean.EbeanServer;
|
||||||
import io.ebean.EbeanServerFactory;
|
import io.ebean.EbeanServerFactory;
|
||||||
import io.ebean.Transaction;
|
import io.ebean.Transaction;
|
||||||
|
|||||||
@@ -23,9 +23,6 @@ import org.junit.Test;
|
|||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class TestChangeLog extends BaseTestCase {
|
public class TestChangeLog extends BaseTestCase {
|
||||||
|
|
||||||
TDChangeLogPrepare changeLogPrepare = new TDChangeLogPrepare();
|
TDChangeLogPrepare changeLogPrepare = new TDChangeLogPrepare();
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import org.tests.model.basic.cache.CInhTwo;
|
|||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
import static org.junit.Assert.*;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ import io.ebean.Ebean;
|
|||||||
import io.ebean.EbeanServer;
|
import io.ebean.EbeanServer;
|
||||||
import org.tests.model.basic.Order.Status;
|
import org.tests.model.basic.Order.Status;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
|
||||||
|
|
||||||
import java.sql.Date;
|
import java.sql.Date;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package org.tests.model.elementcollection;
|
|||||||
|
|
||||||
import io.ebean.BaseTestCase;
|
import io.ebean.BaseTestCase;
|
||||||
import io.ebean.Ebean;
|
import io.ebean.Ebean;
|
||||||
import io.ebean.annotation.PersistBatch;
|
|
||||||
|
|
||||||
import org.ebeantest.LoggedSqlCollector;
|
import org.ebeantest.LoggedSqlCollector;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|||||||
-1
@@ -2,7 +2,6 @@ package org.tests.model.elementcollection;
|
|||||||
|
|
||||||
import io.ebean.BaseTestCase;
|
import io.ebean.BaseTestCase;
|
||||||
import io.ebean.Ebean;
|
import io.ebean.Ebean;
|
||||||
import io.ebean.annotation.PersistBatch;
|
|
||||||
|
|
||||||
import org.ebeantest.LoggedSqlCollector;
|
import org.ebeantest.LoggedSqlCollector;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ package org.tests.model.uuidsibling;
|
|||||||
import io.ebean.Finder;
|
import io.ebean.Finder;
|
||||||
import io.ebean.Model;
|
import io.ebean.Model;
|
||||||
import io.ebean.annotation.SoftDelete;
|
import io.ebean.annotation.SoftDelete;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import javax.persistence.CascadeType;
|
import javax.persistence.CascadeType;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
@@ -11,7 +13,7 @@ import javax.persistence.ManyToOne;
|
|||||||
import javax.persistence.OneToOne;
|
import javax.persistence.OneToOne;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
public class USibChild extends Model {
|
public class USibChild extends Model implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 738194912181571389L;
|
private static final long serialVersionUID = 738194912181571389L;
|
||||||
|
|
||||||
|
|||||||
@@ -3,12 +3,15 @@ package org.tests.model.uuidsibling;
|
|||||||
import io.ebean.Finder;
|
import io.ebean.Finder;
|
||||||
import io.ebean.Model;
|
import io.ebean.Model;
|
||||||
import io.ebean.annotation.SoftDelete;
|
import io.ebean.annotation.SoftDelete;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.OneToOne;
|
import javax.persistence.OneToOne;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
public class USibChildSibling extends Model {
|
public class USibChildSibling extends Model implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 738194912181571389L;
|
private static final long serialVersionUID = 738194912181571389L;
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ package org.tests.model.uuidsibling;
|
|||||||
import io.ebean.Finder;
|
import io.ebean.Finder;
|
||||||
import io.ebean.Model;
|
import io.ebean.Model;
|
||||||
import io.ebean.annotation.SoftDelete;
|
import io.ebean.annotation.SoftDelete;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.persistence.CascadeType;
|
import javax.persistence.CascadeType;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
@@ -10,7 +12,7 @@ import javax.persistence.Id;
|
|||||||
import javax.persistence.OneToMany;
|
import javax.persistence.OneToMany;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
public class USibParent extends Model {
|
public class USibParent extends Model implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 4116545858939406149L;
|
private static final long serialVersionUID = 4116545858939406149L;
|
||||||
|
|
||||||
|
|||||||
@@ -2,13 +2,11 @@ package org.tests.o2m.jointable;
|
|||||||
|
|
||||||
import io.ebean.BaseTestCase;
|
import io.ebean.BaseTestCase;
|
||||||
import io.ebean.Ebean;
|
import io.ebean.Ebean;
|
||||||
import io.ebean.annotation.PersistBatch;
|
|
||||||
|
|
||||||
import org.ebeantest.LoggedSqlCollector;
|
import org.ebeantest.LoggedSqlCollector;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package org.tests.query.other;
|
package org.tests.query.other;
|
||||||
|
|
||||||
import io.ebean.BaseTestCase;
|
|
||||||
import io.ebean.Ebean;
|
import io.ebean.Ebean;
|
||||||
import io.ebean.TransactionalTestCase;
|
import io.ebean.TransactionalTestCase;
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import io.ebean.TransactionalTestCase;
|
|||||||
import io.ebean.text.csv.CsvReader;
|
import io.ebean.text.csv.CsvReader;
|
||||||
import io.ebean.text.csv.DefaultCsvCallback;
|
import io.ebean.text.csv.DefaultCsvCallback;
|
||||||
import org.tests.model.basic.Customer;
|
import org.tests.model.basic.Customer;
|
||||||
import org.tests.model.basic.ResetBasicData;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|||||||
Reference in new issue
Block a user