Get rid of some X classes ?

Help is preferred to those who publish their work as Open Source and not as private branches rejecting collaboration. Such projects are not maintainable and shall be deleted.
Forum rules
This forum is personally pruned to avoid redundant posts. Related topics are grouped together. IF YOU HAVE REGISTERED, you need to send email to red1(a)red1.org with your username in the subject title to get me to activate you.

Get rid of some X classes ?

Postby nmicoud » Tue Jul 31, 2012 7:51 pm

Hi,

I'm setting up a module for a customer.
The main window is composed of 12 tables (we will call them 'core tables').
Besides, there are about 130 tables, which share the same design (mandatory columns, value, name, 2 checkboxes) ; let's call thel 'list tables'. They are used to give details to core tables records.

Each core table has many columns which refers to other list tables (Table direct).
(I couldn't use Reference list because users (with non System role) have to maintain those list).

Now, I will to create model classes for the core tables, which need X and I classes. That's ok.

My question is : am I forced to add to my project all of X and I classes of list tables (260 files) ?
I mean, i will never used them, but there are called by core model classes.
Is there a way to create a kind of generic X and I classes ?
Or something else ?


Thanks,

Nicolas
nmicoud
Regular
 
Posts: 137
Joined: Fri Oct 07, 2011 6:19 pm

Re: Get rid of some X classes ?

Postby globalqss » Wed Aug 01, 2012 5:15 am

Hi Nicolas, X classes are not strictly needed - you can develop using just PO with generic getters and setters, model validators, etc.

The code is cleaner and clearer using X classes, but they are not forced.

Regards,

Carlos Ruiz
globalqss
Senior
 
Posts: 599
Joined: Thu Dec 29, 2005 4:15 am
Location: Bogotá, Colombia

Re: Get rid of some X classes ?

Postby nmicoud » Wed Aug 01, 2012 3:18 pm

Thanks for answering.
Actually, i would like to use X classes of core tables (i need them, easier than using PO). But not ones of list tables.

I mean :
If you remove I_C_BPartner and X_C_BPartner, then you will get errors in X_C_Invoice (eg: method public I_C_BPartner getC_BPartner()).

But i think i would have to modify manually the generated X classes to remove method which calls unpresent classes.
Too bad, i'll add them.

Thanks,

Nicolas
nmicoud
Regular
 
Posts: 137
Joined: Fri Oct 07, 2011 6:19 pm

Re: Get rid of some X classes ?

Postby globalqss » Wed Aug 01, 2012 9:42 pm

Nicolas, I think is not a good idea to change X_ classes for core tables - this is because if extensions do that then you can find conflicts with several extensions modifying the same X_ class.

Regards,

Carlos Ruiz
globalqss
Senior
 
Posts: 599
Joined: Thu Dec 29, 2005 4:15 am
Location: Bogotá, Colombia

Re: Get rid of some X classes ?

Postby nmicoud » Thu Aug 02, 2012 1:34 am

Yes, you're right.
But i wanted to avoid adding classes which will load down needlessly the project.
But, seems too risky.

Thanks

Nicolas
nmicoud
Regular
 
Posts: 137
Joined: Fri Oct 07, 2011 6:19 pm

Re: Get rid of some X classes ?

Postby red1 » Sat Oct 13, 2012 8:58 am

Are you writing core model classes for your new tables? If not, you need not GenerateModel those X and I classes.
red1
Site Admin
 
Posts: 2760
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia


Return to HELP ME!!!

Who is online

Users browsing this forum: No registered users and 1 guest

cron