circular-reference

POJO with other POJO references.

I am working on a API to access data stored in a system. The system contains things like people, appointments and procedures associated with those appointments. My application will strictly be read-only. I am using Spring w/ RowMapper to build objects such a "Person", "Appointment" and "Procedure". I have a DAO for each element. (ie: P...

Need Help with a Trigger for preventing a circular reference on a table

Hi all, We currently have a table that looks like this: ChildId | ParentID ------------------ 1 | NULL 2 | NULL 3 | 1 4 | 3 Can anyone help me come up with a constraint/trigger that would prevent a circular reference from being inserted or updated into the table? Thanks ...

How to serialize DOM node to JSON?

I want to serialize DOM node or even whole window to JSON. For example: >> serialize(document) -> { "URL": "http://stackoverflow.com/posts/2303713", "body": { "aLink": "", "attributes": [ "getNamedItem": "function getNamedItem() { [native code] }", ... ], ... "ownerDocument": "#" // recursive link he...

.NET Assembly References going all circular on me.

Update: Last night, I decided that this is just too much work to change the folder where some reports are saved. My work-around here is to rename the folder, run the batch job I need done, and then change the folder name back to what it was originally. I feel like I could spend the rest of today and all of next week working on this and...

How to detect circular references between assemblies in a .NET solution?

Do you know of an effective way to detect circular references between .Net assemblies? The situation I would like to detect/prevent is such as: A references B B references D D references A ...

Can I trigger PHP garbage collection to happen automatically if I have circular references?

I seem to recall a way to setup the __destruct for a class in such a way that it would ensure that circular references would be cleaned up as soon as the outside object falls out of scope. However, the simple test I built seems to indicate that this is not behaving as I had expected/hoped. Is there a way to setup my classes in such a wa...

Creating circular generic references

I am writing an application to do some distributed calculations in a peer to peer network. In defining the network I have two class the P2PNetwork and P2PClient. I want these to be generic and so have the definitions of: P2PNetwork<T extends P2PClient<? extends P2PNetwork<T>>> P2PClient<T extends P2PNetwork<? extends T>> with P2PClie...

Access sql query Circular Reference error

I'm creating a sql select query for an access database, and receiving a circular reference error, because my alias name is the same as a column name in my expression. Here is the fragment of my query: switch([CULET]='N','NONE', [CULET]='S', 'SMALL',[CULET]='VS','VERY SMALL', [CULET]='SL',' ',[CULET]='MD',' ') AS [Culet] This specif...

Resolving Circular References for Objects Implementing ISerializable

I'm writing my own IFormatter implementation and I cannot think of a way to resolve circular references between two types that both implement ISerializable. Here's the usual pattern: [Serializable] class Foo : ISerializable { private Bar m_bar; public Foo(Bar bar) { m_bar = bar; m_bar.Foo = this; } ...

a design to avoid circular reference in this scenario

Here is our dependency tree: BigApp -> Child Apps -> Libraries ALL of our components are HEAVILY using one of the Libraries as above ( LibA). But it has a ‘few’ public methods that require classes from ‘higher-level’ assemblies and we want to avoid CIRCULAR references. What do you propose as a good design for this? ...

DB Design - Linking to a parent without circular reference issues

Hi all, I'm having trouble coming up with a solution for the following issue. Lets say i have a db that looks something like the following: Issue Table Id | Details | CreateDate | ClosedDate Issue Notes Table Id | ObjectId | Notes | NoteDate Issue Assignment Table Id | ObjectId | AssignedToId| AssignedDate I'd like allow the ...

Java: how to avoid circual references when dumping object information with reflection?

I've modified an object dumping method to avoid circual references causing a StackOverflow error. This is what I ended up with: //returns all fields of the given object in a string public static String dumpFields(Object o, int callCount, ArrayList excludeList) { //add this object to the exclude list to avoid circual references in th...

Garbage collection in Perl

Unlike Java, Perl uses reference count for garbage collection. I have tried searching some previous questions which speak about C++ RAII and smart pointers and Java GC but have not understood how Perl deals with the circular referencing problem. Can anyone explain how Perl's garbage collector deals with circular references? Is there an...

error MSB4006: There is a circular dependency in the target dependency graph involving target "Install".

I'm use msbuild for deploy my applications, using VS 2008, windows xp It appears this errors: warning MSB4011: There is a circular reference involving the import of file. error MSB4006: There is a circular dependency in the target dependency graph involving target "Install". ScriptDespliegue.Targets file call to task from $(MSBuild...

How can this circular, bidirectional dependency be resolved?

I have a RequestHandler class and a RequestListener class. A RequestHandler creates a RequestListener and passes it a reference to itself. The RequestListener in turn calls methods on the RequestHandler to handle requests of different types when they are processed (eg handleTypeARequest(), handleTypeBRequest() and so on). Unfortunately, ...

VB.NET - Custom Serialization and Circular References, is there a clean solution?

I'm implementing some custom serialization (to byte array), and have run into a problem handling circular references. Example: Class A public MyBs as new List(of B) end class class B public MyParent as A public MiscInt1 as integer public MiscInt2 as integer end class When serializing A, I must serialize each instance of B....

Getting [NSObject description]s for objects holding circular references.

I have an NSDictionary. It holds several objects, including an array of child NSDictionaries, each of which have an object keyed as @"Parent" that point back to the parent NSDictionary. This circular reference breaks the ability to inspect the object with a classic call like: NSLog(@"%@", [myDictionary description]); Would anyone be ...

.NET 4, WCF REST Services, Entity Framework, Serialization, and circular references

That title is quite a mouthful. Let me try to be as clear as I can... I have a WCF REST Service written in .NET 4 that uses the entity framework to pull some data from SQL Server into a list of objects. The objects are then returned as XML to the client. The problem is that the XML have references to each other due to my model's rela...

Are circular references ever necessary?

I've inherited a Visual Studio Solution that contains numerous circular references between Projects. Is there ever a situation where this is remotely acceptable? Just trying to confirm my suspicion that this application is designed horribly. Thanks in advance. ...

Circular References

Possible Duplicate: Why are circular dependencies considered harmful? I have a line object and a point object. A line has references to two points, and each point has a reference back to the line object it belongs to. I have heard somewhere (I think) that circular references are a bad thing, but I don't understand why. Can s...