Cross reference example [message #1729015] |
Sat, 09 April 2016 13:51 |
|
Hey guys!
Im playing with this tool, and i want to try something interesting, but the Vorto refuses to help me, and i cant figure it out how can i make it. Can you help me, giving an example of code?
So, i want to create two Entity/Enum, whom has an attribute referring to each other. so for example:
Entity Alpha {
mandatory Attrib1 as Beta
}
and
Enitity Beta {
mandatory Attrib2 as Alpha
}
How does it work? How does it look like(imports, usings)? I want to check the implemented generators, how they defend this kind of reference and not going into infinite loop, when they generate stuff.
I also interested this kind of reference in the function blocks. Can you help me?
Best regards,
Math
|
|
|
|
Re: Cross reference example [message #1729095 is a reply to message #1729079] |
Mon, 11 April 2016 07:35 |
|
Im trying to make a generic generator, what creates SQL tables from the modell, so my problem is, when i create tables, multiple tables can be created for the same entity. I walk trough the infomodells, the referred functionblocks and lastly the referred Entities and Enums. But this issue comes to my mind when i checked some example codes, and it contains entities with referred entities. So one way its possible, but two-way is forbidden?
|
|
|
|
Re: Cross reference example [message #1729104 is a reply to message #1729098] |
Mon, 11 April 2016 08:51 |
|
Hey!
I will check it today later but for the first blink i have to say, if i drop one entity to the other in the DataType Perspective, it creates a reference (Ive tried it already). But what i want is an actual attribute of the Entity(like how i explained in the topic opener), couse during the code generation, i walk trough the properties of the elements. I guess now this kind of reference is forbidden, but correct me.
I havent make my decision about the contrubution, first of all it must be a useful, working generator, to make sense of sharing
|
|
|
|
Re: Cross reference example [message #1729246 is a reply to message #1729109] |
Tue, 12 April 2016 11:47 |
|
Thanks the help, i can finally make this example! The good thing is my generator doesnt goes crazy with this type of infinite loop, but the bad thing is it doesnt even recognize it like a Entity property. i have to do some work with it, and hopefully i can fix it. Thanks the help!
|
|
|
|
Re: Cross reference example [message #1729840 is a reply to message #1729347] |
Tue, 19 April 2016 12:47 |
|
Finally i solved to force my generator working perfectly. Thanks for the help, but i have another question.
Its a bit different topic, but i hope that you wouldnt mind if i ask it here So...
I want to make my generator a bit generic, so after the rightclick->generate order, somehow you can manipulate the sort of database, language of the generated code, etc. Is there any option, to provide a bunch of variations, parameters to the user, during the code generation?
Thanks for the help in advance!
Best regards,
Math
[Updated on: Tue, 19 April 2016 12:47] Report message to a moderator
|
|
|
|
Re: Cross reference example [message #1733894 is a reply to message #1729840] |
Wed, 01 June 2016 21:47 |
Marcus Munzert Messages: 10 Registered: August 2012 Location: Freiburg, Germany |
Junior Member |
|
|
Hi Math,
I have just read your question regarding the provisioning of parameters for your Generator. Our Virtual Developer Platform allows you to define such parameters for generators that run on it. Also, in relation to Vorto, Virtual Developer lets you ...
- deploy and execute existing Vorto generators (we are currently working on a proof of this by doing it for one of the exmple generators of Vorto)
- develop generators that access the Vorto model repository remotely, through their REST-API
- develop generators that consume Vorto models in form of a set of model files
Cheers,
Marcus
CEO and President
Generative Software GmbH
Cornelia-Schlosser-Allee 15
79111 Freiburg
Germany
www.generative-software.de
Phone: +49 761 1562051
Fax: +49 761 7043098
www.virtual-developer.com
The efficient use of software development
|
|
|
Powered by
FUDForum. Page generated in 0.03942 seconds