Wednesday, November 14, 2012

Re: varchars as foreign keys in Cake leads to conversion to Int Error - using MS SQL

actually, just bellow the red err message there is an SQL being triggered....there is also table called 'die' (technical term :) which has same relations like 'material'. currently I have only die table filled, so materials sql does not go to collision I guess.

SELECT [Dy].[ID] AS [Dy__ID], [Dy].[GLID] AS [Dy__GLID], .................., [Dy].[ShelfPos] AS [Dy__ShelfPos] FROM [die] AS [Dy] WHERE [Dy].[GLID] = (1)

The interesting part I thing is the [Dy].[GLID] = (1)

...it I guess It should be [Dy].[GLID] = 'G12345'

Tom

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

No comments: