Grails: What is the difference between extending and embedding a domain class? -


i'm new grails framework, please bear me.

nonetheless, bit confused on functionality difference between extending domain class , embedding objects.
database point of view, both same thing. when embedding object, properties of classes stored in 1 table. similarily, when extending class (using table-per-hierarchy), properties of classes stored in 1 table.

i'm sure there functionality difference between these two, , figured ask question.
when use either one?

the technical difference ability have multiple tables through table per subclass property when extending class. otherwise, identical in use.

however, said, extending class modeling within class structure can make use of instanceof , polymorphic features of java/groovy.


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -