November Happy Hour will be moved to Thursday December 5th.

How do models perform their magic in Opti?

Vote:
 

I admitedly don't spend a lot of time in our CMS code making changes, so when I do get in there sometimes it all seems like magic!

I was hoping someone could explain in simple terms how Opti is pulling off this trick that I can add a new property into this class and then see it pop up right away as a choice on the property editors in the CMS?

More-over, when I make a change like this into production, should I be careful about making sure I go to a maintainence page or antyhign? Seems like this would be a lot of database updates?

#329826
Sep 13, 2024 17:34
Vote:
 

If you add a new property to an existing type it does not mean that all instances of that type will be affected. 

What will happen is that when you try to create a new instance then you will see the new property editor but all old instances will just have null/default(T) as the value.

Our internal type scanner always runs during initialization and tries to match code-based content type definitions with database.

#331178
Oct 09, 2024 13:11
Vote:
 

Thanks Bartosz, that makes a lot of sense. 

I'm always just trying to pair my Opti knowledge with how things work in plain old MVC. Adding the detail about your type scanners work is very valuable!

#331179
Oct 09, 2024 13:15
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.