![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
I think I got it where all this bs about passing around numerical ids of entities instead of entity references (maybe lazy) come from. It's like 'error code'. It comes from the ancient c programming, where we just could not allocate a string for a readable piece of text, or for the data that may need some efforts to instantiate or allocate.
In short. It's stupid to pass around "ids" in a program.
In short. It's stupid to pass around "ids" in a program.
no subject
Date: 2015-10-02 10:03 am (UTC)But what we have are layers and layers of performance-killing wrappers like in (N)Hibernate and it`s much easier to work with simple types (long,int,whatever) in record fields.
Also these wrappers are not actually transparent. Simple long id cannot cause a LazyInitializationException, unlike some wrapper with reference to long-closed Session.