-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Question: MSSQL, retrieving data from existing table? #2920
Comments
|
@mickhansen
I still get the same error message:
|
@Bondifrench yep, give me a day or two to sort it out, definitely left out proper schema support during the initial dialect support, though it shouldn't be too difficult. |
@Bondifrench hi, I think I've added proper schema support in my latest commit. You can try it out to see if it solves your problem, the code is here: https://github.com/mbroadst/sequelize/tree/schema-support, or it may be merged into master relatively soon |
@mbroadst
and I still get the following error:
As I mentionned before it's a legacy table, ie an already existing table, not created initially with Sequelize, does it matter? |
@Bondifrench you can't use rc7 this hasn't been introduced to a tagged release candidate yet, instead you should change your package.json's dependencies to point to master, like so:
|
@Bondifrench it shouldn't matter that its an existing table, but it does seem that you're not getting one of the column names right. Could you possibly use microsoft sql server management studio to run this query for me 'sp_help"Domain.GICS_Industry"' so we can see the actual column names compared to the ones that sequelize is generating? |
Sorry was busy with other things, your fix to Sequelize did enable me to run the query correctly, thanks for that. Thanks a lot Matt for your work on the MS SQL part, and thanks to the Sequelize team, awesome job. |
I am trying to retrieve data from an existing table in MSSQL, the table name is Domain.GICS_Industry
it has 4 columns:
id (primary key, integer, not null)
code (integer, null)
Name (nvarchar(255), null)
IndustryGroupId (foreignkey, integer, null)
I tried to retrieve the data like this:
I get the following message:
Am I obliged to define the other table that the foreign key refers to?
Actually I tried, modifying the definition like this:
I got more or less the same error:
What am I doing wrong?
I did verify that I could connect to MSSQL beforehand, I am using "sequelize": "^2.0.0-rc7" with tedious
Thanks
@mbroadst @mickhansen
The text was updated successfully, but these errors were encountered: