How to use the table from many models
CapableObjects Forums
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



How to use the table from many models Expand / Collapse
Author
Message
Posted 2008-12-10 06:09:38
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 2 days ago @ 16:25:35
Posts: 137, Visits: 411
Hi All,

The classical example is "Order/Receipt/etc...".
I have classes "Item", "Order", "Receipt". In the model the "Order" is associated to the "Item", "Receipt" is associated to the "Item" too.
I want to divide my complex model in to 2 models "Order/Item" and "Receipt/Item".
But how to use the "Item" table from 2 models? Can I share this table between models? Is it possible?

(ECO4, VS2008, single developer license)

Thank you,
Best Regards,
Alex
Post #1393
Posted 2008-12-11 08:50:33
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: 2010-11-30 12:17:13
Posts: 1 230, Visits: 1 382
In EcoModeler, you can add a reference to an ecopkg-file (eco4/RadStudio format), or an mmcseco (ecomodeler format). This way you can reference classes (add associations to them) from the new model. Make sure you include both packages in your ecospace to make up the whole model at runtime.

The generated code will only expose properties for one of the sides in the relation (it can't update the code in the referenced assembly). In Eco5 we will solve this with extension methods, so that both ends of the association will be navigable in code. In OCL they are both navigable in Eco4 too.


/Jonas Hogstrom [CapableObjects]
Post #1405
Posted 2008-12-12 05:19:23
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 2 days ago @ 16:25:35
Posts: 137, Visits: 411
Jonas,
Thank you

Best Regards,
Alex
Post #1417
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: HansKarlsen, Jonas Hogstrom, PeterMorris

Permissions Expand / Collapse

All times are GMT +1:00, Time now is 12:15

Powered By InstantForum.NET v4.1.4 © 2012
Execution: 0,344. 7 queries. Compression Disabled.