Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] AR with table names.
#1

[eluser]Clooner[/eluser]
I'm currently rewriting a CI application which has a lot of bad SQL and I'm trying to speed it up significantly. One of the big problems what I run into is that most SQL in this case is not written in AR. I found out why this is because AR messes up large parts of the table names.

It's not uncommon to have a dash in a table name in this project but in a join using AR things get messed up. Lets say we have the table: tax-groups and we are doing a join. AR will actually protect the table name to `tax`-`groups` and not `tax-groups`.

Is this wanted behavior or a bug.?

I know I can simply disable the protect identifiers and put them in myself or get the SQL statement and replace `-` by a - but I would like to use AR.



Messages In This Thread
[SOLVED] AR with table names. - by El Forum - 02-15-2012, 08:51 AM
[SOLVED] AR with table names. - by El Forum - 02-15-2012, 12:13 PM
[SOLVED] AR with table names. - by El Forum - 02-15-2012, 12:27 PM
[SOLVED] AR with table names. - by El Forum - 02-15-2012, 12:36 PM
[SOLVED] AR with table names. - by El Forum - 02-15-2012, 12:42 PM
[SOLVED] AR with table names. - by El Forum - 02-15-2012, 12:54 PM
[SOLVED] AR with table names. - by El Forum - 02-15-2012, 01:04 PM
[SOLVED] AR with table names. - by El Forum - 02-15-2012, 01:08 PM
[SOLVED] AR with table names. - by El Forum - 02-15-2012, 01:22 PM



Theme © iAndrew 2016 - Forum software by © MyBB