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

tables layout and database script #10

Closed
4 of 5 tasks
mbaniasad opened this issue May 11, 2016 · 5 comments
Closed
4 of 5 tasks

tables layout and database script #10

mbaniasad opened this issue May 11, 2016 · 5 comments
Assignees
Labels
Milestone

Comments

@mbaniasad
Copy link
Contributor

mbaniasad commented May 11, 2016

sql script for creating the database should be written

  • tables and fields discussed
  • sql script for creating the tables should be created
  • all the needed fields for hibernate is added
  • initial data
  • review the script
@mbaniasad mbaniasad self-assigned this May 11, 2016
@mbaniasad mbaniasad assigned razadfki and unassigned mbaniasad May 12, 2016
mbaniasad added a commit that referenced this issue May 12, 2016
razadfki pushed a commit that referenced this issue May 14, 2016
@mbaniasad
Copy link
Contributor Author

@bonkilejay @ricarda42 @mzeen
this is a very important issue. any changes in this issue would have impacts on everyone else .
I have mentioned you here so you all get notified if there is a change.
if there is change here please merge it to your working copy
ps: sorry for getting to many mails

@rrosemann
Copy link
Contributor

@mbaniasad In the creator the bus gets an attribute lineId, but I can't find it in the Master_Data file, so this might be why I get an error when trying to call the bus objects.

@rrosemann
Copy link
Contributor

I get the following error:
2016-05-17 14:38:01.811 WARN 5663 --- [nio-8081-exec-1] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 42122, SQLState: 42S22
2016-05-17 14:38:01.812 ERROR 5663 --- [nio-8081-exec-1] o.h.engine.jdbc.spi.SqlExceptionHelper : Column "BUSENTITY0_.TIMESTAMP" not found; SQL statement:
select busentity0_.id as id1_0_, busentity0_.modificationCounter as modifica2_0_, busentity0_.color as color3_0_, busentity0_.lineId as lineId4_0_, busentity0_.numberPlate as numberPl5_0_, busentity0_.picture as picture6_0_, busentity0_.timeStamp as timeStam7_0_ from BUS busentity0_ [42122-190]
Error: could not prepare statement; SQL [select busentity0_.id as id1_0_, busentity0_.modificationCounter as modifica2_0_, busentity0_.color as color3_0_, busentity0_.lineId as lineId4_0_, busentity0_.numberPlate as numberPl5_0_, busentity0_.picture as picture6_0_, busentity0_.timeStamp as timeStam7_0_ from BUS busentity0_]; nested exception is org.hibernate.exception.SQLGrammarException: could not prepare statement

The code of the bus component should be in complete analogy to the line component, so I don't see why it does not work. (Line component works fine) There might be some problem with the data base, but as I am not familiar with data bases and SQL, I don't know how to fix this.
@mbaniasad @razadfki @maybeec I would be grateful if someone could help.

@razadfki
Copy link
Contributor

@ricarda42 go to following files
buergerbusserver\core\src\main\resources\db\migration\V0002__R001_Master_data.sql buergerbusserver\core\src\main\resources\db\migration\h2\V0001__R001_Create_schema.sql
there you'll find statements for bus in Create and Insert replace the first timestamp in create with Capital ones e.g., "timestamp" -> "TIMESTAMP"
and replace again in Insert statement.

@rrosemann
Copy link
Contributor

Thanks a lot, it works now :-)

rrosemann added a commit that referenced this issue May 17, 2016
@ChristianAGSE ChristianAGSE added this to the Iteration2 milestone May 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants