On Mon, Feb 8, 2010 at 3:32 PM, Jeremy Evans <[email protected]> wrote:
> On Feb 8, 12:45 pm, John Firebaugh <[email protected]> wrote:
>> I'm having a problem with schema-qualified tables used in eager graphs
>> under MSSQL:
>>
>> http://pastie.org/815193
>>
>> The last line in that example produces the following SQL:
>>
>> SELECT [s].[a].[id], [s].[a].[b_id], [s].[a].[c_id], [s].[a].[b_id],
>> [c].[id] AS [c_id_0] FROM (SELECT * FROM [s].[a] INNER JOIN [s].[b] ON
>> ([s].[b].[b_id] = [s].[a].[b_id])) AS [s__a] LEFT OUTER JOIN [s].[c]
>> AS [c] ON ([c].[id] = [s].[a].[c_id])
>>
>> Note the table alias [s__a].
>
> Wow, that is a complex case.  I don't think that situations where you
> are joining separately from graphing are fully tested, even without
> throwing in schemas.  At least you didn't throw in self referential
> tables.
>
> Anyway, please test the patch at http://pastie.org/815474.txt.

The patch is causing problems in post-loading less-complex
schema-qualified eager graphs -- I get a nil primary_record in
eager_graph_build_associations. It looks like 'master' is now schema
unqualified but the record_graph is still keyed by a unsplit symbol
with qualification.

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to