Skip to content
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

Getting citier to work with SQL server #46

Open
ianpetzer opened this issue Jan 3, 2012 · 0 comments
Open

Getting citier to work with SQL server #46

ianpetzer opened this issue Jan 3, 2012 · 0 comments

Comments

@ianpetzer
Copy link

Hi,

I'm trying to get Citier working with SQL server but I'm having an issue when trying to insert a subclass into the database.

When using the Citier sample app for example, an insert is made into the database for the subtype (the 'book' in the sample app) giving it an id of 1, however when the insert is made into the root entity (the 'product in the sample app) it is given an id of 19.

The view is therefore unable to link the two entities.

The stack trace below shows this happening.

Could anyone point me in the right direction of where I should look to fix this issue. Even just a class name or some ideas would be great.

Below is the log showing the behaviour described above: (The only detail missing is the fact that the book was created with an id of 1)

Started POST "/books" for 127.0.0.1 at 2012-01-03 16:12:46 +0200
Processing by BooksController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"ET5lKz/lt+/wOPv1vdHMWT/SKZEQqFqq9sJQ+hez698=", "book"=>{"title"=>"qwe", "author"=>"qwe"}, "commit"=>"Create Book"}
EXECUTE (33.8ms) BEGIN TRANSACTION
AREL (73.6ms) INSERT INTO [products]([type], [name], [price], [created_at], [updated_at]) VALUES (N'Book', N'Title of book: qwe', NULL, '2012-01-03 14:12:46.740', '2012-01-03 14:12:46.740')
EXECUTE (46.2ms) COMMIT TRANSACTION
EXECUTE (33.4ms) BEGIN TRANSACTION
IDENTITY_INSERT (70.0ms) SET IDENTITY_INSERT [books] ON
AREL (36.7ms) INSERT INTO [books]([title], [author], [id]) VALUES (N'qwe', N'qwe', 19)
IDENTITY_INSERT (34.7ms) SET IDENTITY_INSERT [books] OFF
EXECUTE (35.0ms) COMMIT TRANSACTION
Redirected to http://localhost:3000/books/19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant