I have just started a project to make my employer a management software. I have a niggling, but potentially simple, query that I can't seem to find any information on.
Is it prudent/good practice to have a 2 way 'has a' relationship between objects. So can, for example, a Client
object 'have a' Site
, and then the Site
'has a' Client
, where the Client
object is the Client
that 'has' the Site
?
public class Client {
Site site;
}
public class Site {
Client client;
}
Is there anything objectionable (no pun intended) to this, or is it fine? I am currently creating a mock-up UML for the project, and this has been bothering me.