Print Page | Close Window

Export Entities to different files

Printed From: TMS Software
Category: Business Tools
Forum Name: Data Modeler
Forum Discription:
URL: http://www.tmssoftware.com/site/forum/forum_posts.asp?TID=3456
Printed Date: 15 Sep 2019 at 6:15pm


Topic: Export Entities to different files
Posted By: Miertschink André Felix
Subject: Export Entities to different files
Date Posted: 17 Feb 2014 at 7:55pm
Hi,
I just downloaded the trial version of Data Modeler and Aurelius. I cannot find a way to export the entities to different files having one entity per file. (e.g.: categories.pas, customers.pas, employes.pas, etc.). If this option does not exists yet, it would be to add a suffix as well (e.g. e_categories.pas, e_customers.pas, etc.)
Thx



Replies:
Posted By: Wagner R. Landgraf
Date Posted: 20 Feb 2014 at 8:02am
Hi,
there is no such option indeed. The main problem is that there might be circular references (for example, TInvoice has a list of TInvoiceItem, while in turn a TInvoiceItem has a reference to the TInvoice that owns it. Thus creating one class per unit is just not possible, grouping classes into units would be required and logic for that is complex. 


Posted By: Eduardo Alias
Date Posted: 12 May 2014 at 7:22am
I just tried the Data Modeler to create my classes.

The fact of not generating one entity per unit is a problem for me. I have only one database model for my entire needs, but each project use part of it. So I only add the required units.

I dont see where is problem to track dependency for automatic include of the unit in the uses clause.

However, if this is that difficult, it could be added to the data diagram as GROUP parameter. Then at least could group "TInvoice" and "TInvoiceItem" in the same unit. OR it can mean as GROUP to add the uses on the unit.


Posted By: Wagner R. Landgraf
Date Posted: 12 May 2014 at 2:30pm
Hello Eduardo, 
what is the problem with having all units in the same file? If the classes are not used, the linker will remove them from the final executable, thus it doesn't affect the size of application.
Due to this, automatically solving all circular dependencies doesn't seem to worth the trouble, although we might consider adding a "UnitName" field for each class. But then you would have to add it by yourself one by one, and be subject to compile errors after generation (due to dependencies and circular references) so again, not sure if it's worth the trouble?


Posted By: Eduardo Elias
Date Posted: 12 May 2014 at 3:23pm
Some of my software is licensed with source code.

I have a huge dictionary of classes and entities that I don't want to share fully. 

So my customer gets only what is related to him, as a source code matters.

+1 vote for adding that...


Posted By: Wagner R. Landgraf
Date Posted: 12 May 2014 at 3:31pm
What is the use for your customer to have source code for Aurelius entities, if you can't distribute Aurelius source code?


Posted By: Eduardo Elias
Date Posted: 12 May 2014 at 4:50pm
No, I mean the as entities the unit generated by data modeler. That source code is part of the source code. 

If my costumer needs to compile the application He needs to get a Aurelius license for him. 

However, I need to give the source code, since it is part of the contract. And I dont want to give everything.... just the units that is part of that specific application, and that is a subset of the full range of my entities classes. Got it?

but, nevermind, I want to share the need if you can improve the tool, right now I can not use this way.


Posted By: Wagner R. Landgraf
Date Posted: 12 May 2014 at 5:47pm
Ok, we will consider adding those. It would be great if you could add a feature request for data modeler so it can be voted.



Print Page | Close Window