Jump to content

Doctrine in module


Recommended Posts

Hi, I've used doctrine in other projects but having problems in PrestaShop.

I see the PS creates the tablenames, but is it possible to set the table name? I think the tablenames are not prefixed like the bestpractises advices.

When I have an entity called "BlaFoo", it will create a table like ps_bla_foo. It would be nice when the table name can be prefixed with a company name or namespace the entity is in. Or is it just using (ugly) class names?

Link to comment
Share on other sites

Yes I did.

Lets say I have a namespace of "SnefIT" and an entity classname of "GoogleMaps".

The tablename will be "ps_google_maps" Looks fine, but I think the tablename should be something like "ps_snefit_google_maps" so that it it better prefixed. Workaround is naming the class SnefitGoogleMaps. Is usable i think.

Normally you could give a schema name in the @Table annotation. But not within PrestaShop.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...