Help with fetch type Lazy and Eager, I dont get it in cuba

As far as I remember, Fetch Type Lazy in NHibernate (.net hibernate) means that the related object will not be fetched until you explicitly request it with the getter. and Eager means that it will always be fetched with the initial query.
So. person.getCar() will always return Car, it is just a matter of timing. when fetching the person or when calling person.getCar().

In Cuba, out of the UI context, regular business logic, Eager or Lazy will never bring the Car. I need to create an explicit query for that. Why is that?

I have a user object. How can I get car like NHibernate?

  1. Entity manager can probably do it, but I lose security.
  2. I thought about creating a view. but this is an overkill for just fetching related. and also very dangerous, I fetch an object, pass it to a function, god knows who is using it and how, I need to think about every possible use-case… this is very ugly. On top of that, views are not strongly typed, every refactory I make, I need to search for strings and change them manually…

Can you please clear this one out with some code example?

Got it. open an “idea” for it: Bypassing views in datamanager and working like Hibernate - CUBA.Platform

For those who interested in concepts, there is a good article: Views - the uncharted mystery.