actually yes, I was thinking more of filling in default values or something, or I could even have my own preconditions in the POJO so at least I don't need hibernate jars client side. More importantly, as we have more and more webservices, I could marshal it to xml. In that case, I don't think I can really have hibernate jars on the client side as it might be .NET.
Either way, DTO's or hibernate detached objects, I do prefer one heirarchy and either way it seems you can't send the whole heirarchy of objects and have to at some point make a decision as to where the heirarchy ends. The end of the heirarch is either a DTO with no continuation on...which is sometimes a null object with no exception anyways from some of the DTO's I have seen.
I think the heirarchy either ends with nulls, or self made preconditions.
yes, yes, then the point is how to tell a difference between when something was supposed to be null vs. it being null because we didn't send the whole tree across. I think it might end up being a case by case basis. Sometimes, you could even have a default value that means basically there is more so you know when to throw the exception.
I don't have much experience here, but would think it wouldn't be that hard to accomplish. I guess I will find out soon while I experiment with this on my open source project.
|