circular-dependency

Resolving Maven circular dependencies between test, testhelper, and project-under-test

流过昼夜 提交于 2019-12-01 17:58:12
my set up is this. I have project A , and a test project depending on A : A <- A_t I also have other projects depending on A (and their tests): A <- B <- B_t To simplify some of the testing I introduce a new library helping test stuff based on A : A <- Atesthelper So A_t (and B_t ) will depend on this test helper, like this: A <- A_t ^ | | v Atesthelper However when I create Maven projects (pom.xml) it seems the usual thing is to bundle both the project and the test of that project in the same pom.xml. And I create a new pom.xml for the Atesthelper So now it becomes: (A <- A_t) ^ | | v

Resolving Maven circular dependencies between test, testhelper, and project-under-test

怎甘沉沦 提交于 2019-12-01 17:12:35
问题 my set up is this. I have project A , and a test project depending on A : A <- A_t I also have other projects depending on A (and their tests): A <- B <- B_t To simplify some of the testing I introduce a new library helping test stuff based on A : A <- Atesthelper So A_t (and B_t ) will depend on this test helper, like this: A <- A_t ^ | | v Atesthelper However when I create Maven projects (pom.xml) it seems the usual thing is to bundle both the project and the test of that project in the

Dependency Injection Architectural Design - Service classes circular references

送分小仙女□ 提交于 2019-12-01 11:00:06
问题 I have the following service classes: public class JobService { private UserService us; public JobService (UserService us) { this.us = us; } public void addJob(Job job) { // needs to make a call to user service to update some user info // similar dependency to the deleteUser method } } public class UserService { private JobService js; public UserService(JobService js) { this.js = js; } public void deleteUser(User u) { using (TransactionScope scope = new TransactionScope()) { List<IJob> jobs =

Dynamically creating graphql schema with circular references

假如想象 提交于 2019-12-01 09:03:47
By using graphql-js, I need to create graphql schema dynamically by iterating over array of some data, for example: [{ name: 'author', fields: [{ field: 'name' }, { field: 'books', reference: 'book' }] }, { name: 'book', fields: [{ field: 'title' }, { field: 'author', reference: 'author' }] }] The problem is circular references. When I'm creating AuthorType I need BookType to be already created and vise versa. So resulting schema should look like: type Author : Object { id: ID! name: String, books: [Book] } type Book : Object { id: ID! title: String author: Author } How can I solve this?

Dynamically creating graphql schema with circular references

萝らか妹 提交于 2019-12-01 06:39:14
问题 By using graphql-js, I need to create graphql schema dynamically by iterating over array of some data, for example: [{ name: 'author', fields: [{ field: 'name' }, { field: 'books', reference: 'book' }] }, { name: 'book', fields: [{ field: 'title' }, { field: 'author', reference: 'author' }] }] The problem is circular references. When I'm creating AuthorType I need BookType to be already created and vise versa. So resulting schema should look like: type Author : Object { id: ID! name: String,

Jackson Circular Dependencies

天大地大妈咪最大 提交于 2019-12-01 06:28:18
I have a circular dependency that I am struggling to solve right now Take these two classes - boiler plate code removed for demo purposes Class 1 @Entity @Table(name = "T_CREDENTIAL") @Cache(usage = CacheConcurrencyStrategy.READ_WRITE) @JsonIdentityInfo(generator=ObjectIdGenerators.IntSequenceGenerator.class, property="@id") public class Credential implements Serializable { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; //Removed @JsonIgnore as want to disable certain fields if no credentials are available //Also fetch this in an eager fashion instead of lazily loading it

Angular 2 : Circular Feature module dependency

人盡茶涼 提交于 2019-12-01 05:42:39
I am currently working on one of application of Angular2. I have 3 feature modules in it which contains other sub feature modules. I want to load Sub feature module of Feature 1 into Sub Feature module of Feature 2 and vice a versa. below is sample code. action-routing.module.ts const routes: Routes = [ { path: '', component: ActionComponent, children: [ { path: ':id', loadChildren: 'app/action/action-detail/action-detail.module#ActionDetailModule' } ] } ]; action-detail-routing.module.ts const routes: Routes = [ { path: '', component: ActionDetailComponent, }, { path: 'topic-detail/:id',

Circular dependency - Injecting objects that are directly depended on each other

人盡茶涼 提交于 2019-12-01 03:38:45
I have used Dice PHP DI container for quite a while and it seems the best in terms of simplicity of injecting dependencies. From Dice Documentation : class A { public $b; public function __construct(B $b) { $this->b = $b; } } class B { } $dice = new \Dice\Dice; $a = $dice->create('A'); var_dump($a->b); //B object However, when you have to use objects that are directly dependent on each other, the finall result is server error, because of the infinite loop . Example: class A { public $b; public function __construct(B $b) { $this->b = $b; } } class B { public $a; public function __construct(A $a

Jackson Circular Dependencies

本小妞迷上赌 提交于 2019-12-01 03:30:38
问题 I have a circular dependency that I am struggling to solve right now Take these two classes - boiler plate code removed for demo purposes Class 1 @Entity @Table(name = "T_CREDENTIAL") @Cache(usage = CacheConcurrencyStrategy.READ_WRITE) @JsonIdentityInfo(generator=ObjectIdGenerators.IntSequenceGenerator.class, property="@id") public class Credential implements Serializable { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; //Removed @JsonIgnore as want to disable certain

sqlalchemy.exc.CircularDependencyError: Circular dependency detected

只谈情不闲聊 提交于 2019-12-01 03:21:50
The business logic - One Category may have multiple (1:M) attributes, like Category "Memory" could have attributes Speed, Size, Type etc. at the same time one Category could be sorted by the attribute value (this is stored inside Category.sortByAttribute - which is foreign key to LookupCategoryAttributes table. Trying to construct it via SQLAlchemy, but getting circular dependency detected. What is wrong? class Attribute(Base): __tablename__ = "LookupCategoryAttributes" types = ["date", "float", "integer", "select", "string", "text"] # Properties ID = Column(BigInteger, primary_key=True)