4 ms·
"Hydration" is a term often used on the backend too. I believe I have noticed it for the first time in Doctrine documentation, Object Relational Mapper (ORM), w
by pqb 6y ago
"Hydration" is a term often used on the backend too. I believe I have noticed it for the first time in Doctrine documentation, Object Relational Mapper (ORM), which is similar to Hibernate in Java - it was about transforming data retrieved from SQL database (memory) into usable PHP structure (object) [0]. In my opinion, this term has been perfectly described on the StackOverflow [1].
[0]: https://www.doctrine-project.org/projects/doctrine-phpcr-odm/en/latest/reference/query.html#hydration-modes https://www.doctrine-project.org/projects/doctrine-phpcr-odm...
[1]: https://stackoverflow.com/a/6991192 https://stackoverflow.com/a/6991192
- kbenson 6y agoYeah, I ran across that StackOverflow when I finally removed "react" from my search term when first looking. I will say, hydration in the context of an ORM seems fairly odd to me. My concept of ORMs doesn't mesh well with the need to pre-populate of bunch of template which you fill the data in for, since I think of them as pretty much all data with some behaviorioral added on. I guess it could apply towards auto-fetching data as you traverse relations, but those don't exist in a skeletal form AIUI, they are created as needed when requested and data is queried (that is, there's no structure to hydrate with data after the data comes back). I guess you could create objects, query data, and then add data to objects, but given that you often don't know how many objects you'll need, I'm not sure how beneficial that is. Then again, it's not like I have enough experience with the concept to know the nuances of how it's bandied about.