schmunk42 / yii2-giiant

Yii 2 Framework Code Generator Gii on Steroids
271 stars 120 forks source link

--useSchemaName not implemented #264

Open bwragg opened 4 years ago

bwragg commented 4 years ago

Hi,

Would I be right in saying that --userSchemaName has not yet been implemented in the model generator code? Can't seem to get it working and had a look over the code and seems only half there.

If so I might try adding it in? anything I should know before doing this?

Thanks

schmunk42 commented 4 years ago

I looked at the source of Yii, but I do not relly get what it is doing. What is your use case?

If so I might try adding it in? anything I should know before doing this?

Tests must pass :) Test for this feature would be nice.

bwragg commented 4 years ago

sorry for the delay in getting back to you.

it is meant to do the following:

"This indicates whether to include the schema name in the ActiveRecord class when it's auto generated. Only non default schema would be used"

Im using Postgresql Its useful to get around the issue of having two models that live in 2 schemas with the same name. e.g Sales schema and Support schema may both have "job" tables and "job" models. it would create 1 as SalesJob.php and the other as SupportJob.php

I'll try and come up with some tests.