[eluser]Paul Apostol[/eluser]
Hi m4rw3r,
Really it's a crazy idea, I just asked if somebody did it
. We are fighting for naming conventions, and I'm sure it's unproductive.
The idea is like that:
- I have 2 tables, and a many to many relation: prefix1_table1, prefix2_table2, prefix3_table1_table2 (that doesn't mean if I have another set of table I'll use the same prefixes, I'm making modules and usually I prefix the tables needed for a certain module). The FK for the joining table is table1_id and table2_id. This is the most complex, I think, belongs to and has one is almost the same, eliminating the joining table.
- for simplicity I don't want to use plural of this and singular of that, sometimes I'm not working in EN. I just want to make the model "Prefix1_table1", to define a relation habtm as array('name'=>'prefix2_teable2', 'join_prefix'=>'prefix3_')
That's all.
Maybe a function for making the table and model names must be exposed.
In the end I'm still confused how the library is working. The user guide is not helping me at all. Sorry.
I didn't understood if the relation is opened using the model or is a local behavior. I can chain multiple relations? What is the most complex way to set a module's (not creating new functions)parameters.
Thank you very much.