|
What it sounds more logical to me is: if you don't specify the includeAllAttributes attribute, then Hibernate is free to load all or load nothing, but if you specify it, then Hibernate should do what it says, that is: includeAllAttributes == true -> load all includeAllAttributes == false -> load none but those declared on the EntityGraph.
We all know that one of the problems of ORMs is that they load the DDBBs too much... EntityGraphs are a great way to reduce that load, specially by only loading certain fields. Haven`t you faced the problem of a SQL query created by hibernate that retrieves more than 200 fields when you only need 8?
I can understand that having an Entity with only some fields populated may confuse an unexperimented user, but, such user won't use EntityGraphs.
|