I've coded two model files. For some associations both models have reference to a type in the other file. Also I updated depends-on tag (one model depends on the other) of beans in context file (I know depends-on tag refers to bean which is already created). It is throwing error when I run in tomcat. (1) Is there a way to achieve the above without error? (2) If not, put all types in one model file, is it what I need to do?
you can not have two models that depend on one another in a cirular way. But you also do not need to move alls types into one model file. It should be enough to move the associations to one file, so you have one model depend on the other without the circular route. It should be easy to move the association - you just need to update the name and target class.