Hello. I have the need to create some objects that are compound from some
other domain objects (similar to a "view" in a relational database,
updatable views). Let's say I have Business with businessId and name
properties, 1:n to another entity named BusinessLocation with properties
businessLocationId and name and address properties (to keep things simple
for now). So, for example, I need to create a new object that is
BuisinessLocationView, which contains BuinessLocation.id,
BusinessLocation.name, Business.id and Buiness.name . Then, in some cases, I
want to use such views like BusinessLocationView as a collection within
Business, and as a standalone collection, and also have the ability to
update its fields so the corresponding entities are updated with the changes
(Business and BusinessLocation), and in some cases even add a new view like
BusinessLocationView so it adds a new BusinessLocation.

 

Is there a way to do this? Is that what @ViewModel is for?

 

I would appreciate If you could point me to any sample that might help.

 

Cesar.

 

 



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Reply via email to