Page 1 of 1

Get rid of some X classes ?

PostPosted: Tue Jul 31, 2012 7:51 pm
by nmicoud
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

Re: Get rid of some X classes ?

PostPosted: Wed Aug 01, 2012 5:15 am
by globalqss
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

Re: Get rid of some X classes ?

PostPosted: Wed Aug 01, 2012 3:18 pm
by nmicoud
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

Re: Get rid of some X classes ?

PostPosted: Wed Aug 01, 2012 9:42 pm
by globalqss
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

Re: Get rid of some X classes ?

PostPosted: Thu Aug 02, 2012 1:34 am
by nmicoud
Yes, you're right.
But i wanted to avoid adding classes which will load down needlessly the project.
But, seems too risky.

Thanks

Nicolas

Re: Get rid of some X classes ?

PostPosted: Sat Oct 13, 2012 8:58 am
by red1
Are you writing core model classes for your new tables? If not, you need not GenerateModel those X and I classes.