New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.0 Implement connection prefixes #2666

Closed
josephzidell opened this Issue Jan 16, 2014 · 5 comments

Comments

Projects
None yet
3 participants
@josephzidell

josephzidell commented Jan 16, 2014

Table prefixes don't seem to work in 3.0

The db is called "wwc", and the prefix is "wwc_". I have a table called "wwc_tags", and created a TagsTable file in Repository, but get this error message:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'wwc.tags' doesn't exist

Also, in http://book.cakephp.org/3.0/en/orm/database-basics.html#configuration there's no mention of prefix in the "full list".

@markstory

This comment has been minimized.

Show comment
Hide comment
@markstory

markstory Jan 16, 2014

Member

Nope, we've not implemented table prefixes yet. Last we talked, prefixes were only going to be at the connection level, and never at the table level as that got out of hand when people combined connection + table prefixes.

Member

markstory commented Jan 16, 2014

Nope, we've not implemented table prefixes yet. Last we talked, prefixes were only going to be at the connection level, and never at the table level as that got out of hand when people combined connection + table prefixes.

@josephzidell

This comment has been minimized.

Show comment
Hide comment
@josephzidell

josephzidell Jan 16, 2014

What's involved in getting it to work at the connection level?

josephzidell commented Jan 16, 2014

What's involved in getting it to work at the connection level?

@lorenzo

This comment has been minimized.

Show comment
Hide comment
@lorenzo

lorenzo Jan 16, 2014

Member

It would be quite simple, actually. Just modify the from and join methods in Cake\Database\Query to modify the the name by calling a new method fullTableName in the connection object.

Member

lorenzo commented Jan 16, 2014

It would be quite simple, actually. Just modify the from and join methods in Cake\Database\Query to modify the the name by calling a new method fullTableName in the connection object.

@markstory

This comment has been minimized.

Show comment
Hide comment
@markstory

markstory Jan 16, 2014

Member

@lorenzo Don't forget about joins as well. I should learn to read.

Member

markstory commented Jan 16, 2014

@lorenzo Don't forget about joins as well. I should learn to read.

@lorenzo

This comment has been minimized.

Show comment
Hide comment
@lorenzo

lorenzo Sep 23, 2014

Member

Closing as duplicate of #4118

Member

lorenzo commented Sep 23, 2014

Closing as duplicate of #4118

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment