object committed in service layer - no call to dao?
I am a little confused as to why my objects are being saved from the service layer, without a call to my dao layer.
In a method in my service layer I receive my object that I am going to update by:
Then I make some changes to the group object.
EntityGroup group = (EntityGroup) dao.getEntityGroup();
At the end of the method, I make sure that the object is "safe" for saving. IE, the user did not remove things from the group that should be there, basically a validation. If the validation fails, I throw a custom Exception.
*Note: I found out about the transactionAttribue using something like
which works great for rolling back the transaction, but lets say we don't use this*
However, even without this, I am not calling my dao.saveEntityGroup() method, so I would not think that the group object would be saved. Why is this object being flushed without a specific call to my dao layer?
I hope I explained this well enough.
Thanks in advance!