@Test public void oneToManyTest() { EntityDataStore<Object> ds = RequerySetupUtils.getDataStore(); TagType tagType = randomTagType(); TagValue tagValue = randomTagValue(tagType); ds.insert(tagType); TagType retrieved = ds.findByKey(TagType.class, tagType.getTagTypeId()); assertEquals(tagType.getTagTypeId(), retrieved.getTagTypeId()); assertNotNull(tagValue.getTagValueId()); assertEquals(retrieved.getTagValues().size(), 1); }
@Nonnull public static EntityDataStore<Object> getDataStore() { SchemaModifier schemaModifier = new SchemaModifier(configuration); schemaModifier.createTables(TableCreationMode.CREATE_NOT_EXISTS); return new EntityDataStore<>(configuration); }
RequerySetupUtils { @Nonnull public static EntityDataStore<Object> getDataStore() { SchemaModifier schemaModifier = new SchemaModifier(configuration); schemaModifier.createTables(TableCreationMode.CREATE_NOT_EXISTS); return new EntityDataStore<>(configuration); } }
RequerySetupUtils { @Nonnull public static EntityDataStore<Object> getDataStore() { SchemaModifier schemaModifier = new SchemaModifier(configuration); schemaModifier.createTables(TableCreationMode.CREATE_NOT_EXISTS); return new EntityDataStore<>(configuration); }  }
RequerySetupUtils { @Nonnull public static EntityDataStore<Object> getDataStore() { SchemaModifier schemaModifier = new SchemaModifier(configuration); schemaModifier.createTables(TableCreationMode.CREATE_NOT_EXISTS); return new EntityDataStore<>(configuration); }  @Nonnull static Configuration getConfiguration(); @Nonnull static DataSource getDataSource(); @Nonnull static EntityDataStore<Object> getDataStore(); }
RequerySetupUtils { @Nonnull public static EntityDataStore<Object> getDataStore() { SchemaModifier schemaModifier = new SchemaModifier(configuration); schemaModifier.createTables(TableCreationMode.CREATE_NOT_EXISTS); return new EntityDataStore<>(configuration); }  @Nonnull static Configuration getConfiguration(); @Nonnull static DataSource getDataSource(); @Nonnull static EntityDataStore<Object> getDataStore(); static EntityDataStore<Object> dataStore; }