I'm working on a project that requires I use a legacy database - I have no control over the database structure at all, and can make no changes to it. I've successfully have the database connection working with Microsoft's SQLSRV driver, and can create most models fine.
There are tables where column names include numbers, and therefore, SQL Server requires you to put square brackets around the column name. The same thing can be done when you can create columns with spaces (why, I've no idea), so long as you add square brackets around it.
So the table structure may be as follows:
CREATE TABLE [dbo].[Genres]( ID [int] IDENTITY(1,1) NOT NULL, [50s] [bit] NULL, [60s] [bit] NULL, [70s] [bit] NULL )
However, in attempting to use Gii to generate a model for this table, I recieve the following error:
Column names that does not follow PHP variable naming convention: Genres.50s.
Is there any known solution to this? Like I say, I can't rename the columns.
Thanks in advance.