{"action":"created","issue":{"url":"https://api.github.com/repos/jhipster/jhipster-core/issues/60","repository_url":"https://api.github.com/repos/jhipster/jhipster-core","labels_url":"https://api.github.com/repos/jhipster/jhipster-core/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/jhipster/jhipster-core/issues/60/comments","events_url":"https://api.github.com/repos/jhipster/jhipster-core/issues/60/events","html_url":"https://github.com/jhipster/jhipster-core/issues/60","id":177871194,"number":60,"title":"Gateway validates based on own databaseType","user":{"login":"ruddell","id":4294623,"avatar_url":"https://avatars.githubusercontent.com/u/4294623?v=3","gravatar_id":"","url":"https://api.github.com/users/ruddell","html_url":"https://github.com/ruddell","followers_url":"https://api.github.com/users/ruddell/followers","following_url":"https://api.github.com/users/ruddell/following{/other_user}","gists_url":"https://api.github.com/users/ruddell/gists{/gist_id}","starred_url":"https://api.github.com/users/ruddell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruddell/subscriptions","organizations_url":"https://api.github.com/users/ruddell/orgs","repos_url":"https://api.github.com/users/ruddell/repos","events_url":"https://api.github.com/users/ruddell/events{/privacy}","received_events_url":"https://api.github.com/users/ruddell/received_events","type":"User","site_admin":false},"labels":[{"id":338854475,"url":"https://api.github.com/repos/jhipster/jhipster-core/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-09-19T19:14:17Z","updated_at":"2016-10-31T09:49:36Z","closed_at":null,"body":"When generating entities on the Gateway with a Microservice's JDL, the validation uses the Gateway's databaseType.  It should just generate the UI as the entity has no server code.  Two examples:\n1. When the Gateway uses Cassandra, the microservice entities are checked for Cassandra fields even if the entity table (in the microservice) uses another database type.  In this case, `ZonedDateTime` is not an allowed type (works for MySQL though).\n2. Related issue is that the gateway shouldn't validate relationships for microservice entities.  If the Gateway uses MongoDB, the entities are checked for relationships and the error `NoSQL entities don't have relationships.` is thrown.\n\nThis sample JDL has two entities for the microservice `testservice` which will fail to generate a UI on a Gateway that uses MongoDB or Cassandra.\n\n```\nentity Book {\n    dateWritten ZonedDateTime // broken in Cassandra gateway - no ZonedDateTime support\n}\nentity Author\n\nrelationship OneToMany {\n  // broken in MongoDB gateway\n  Author{book} to Book{writer(name)}\n}\nmicroservice * with testservice\n```\n\n<details>\n  <summary>\n\nCassandra Gateway .yo-rc.json</summary>\n\n\n\n```\n\n{\n  \"generator-jhipster\": {\n    \"jhipsterVersion\": \"3.7.1\",\n    \"baseName\": \"gway\",\n    \"packageName\": \"com.mycompany.myapp\",\n    \"packageFolder\": \"com/mycompany/myapp\",\n    \"serverPort\": \"8080\",\n    \"authenticationType\": \"jwt\",\n    \"hibernateCache\": \"no\",\n    \"clusteredHttpSession\": false,\n    \"websocket\": false,\n    \"databaseType\": \"cassandra\",\n    \"devDatabaseType\": \"cassandra\",\n    \"prodDatabaseType\": \"cassandra\",\n    \"searchEngine\": false,\n    \"buildTool\": \"maven\",\n    \"enableSocialSignIn\": false,\n    \"jwtSecretKey\": \"d93eaf394dbac702198a0ea3c1c25e17b866dd2d\",\n    \"useSass\": false,\n    \"applicationType\": \"gateway\",\n    \"testFrameworks\": [\n      \"gatling\"\n    ],\n    \"jhiPrefix\": \"jhi\",\n    \"enableTranslation\": true,\n    \"nativeLanguage\": \"en\",\n    \"languages\": [\n      \"en\"\n    ]\n  }\n}\n```\n\n</details>\n\n<details>\n  <summary>\n\nMongo Gateway .yo-rc.json</summary>\n\n\n\n```\n{\n  \"generator-jhipster\": {\n    \"jhipsterVersion\": \"3.7.1\",\n    \"baseName\": \"mongogway\",\n    \"packageName\": \"com.mycompany.myapp\",\n    \"packageFolder\": \"com/mycompany/myapp\",\n    \"serverPort\": \"8080\",\n    \"authenticationType\": \"jwt\",\n    \"hibernateCache\": \"no\",\n    \"clusteredHttpSession\": false,\n    \"websocket\": false,\n    \"databaseType\": \"mongodb\",\n    \"devDatabaseType\": \"mongodb\",\n    \"prodDatabaseType\": \"mongodb\",\n    \"searchEngine\": false,\n    \"buildTool\": \"maven\",\n    \"enableSocialSignIn\": false,\n    \"jwtSecretKey\": \"26bb5ea6615157ff5cdc9aec596d4b79043e5b7f\",\n    \"useSass\": false,\n    \"applicationType\": \"gateway\",\n    \"testFrameworks\": [\n      \"gatling\"\n    ],\n    \"jhiPrefix\": \"jhi\",\n    \"enableTranslation\": true,\n    \"nativeLanguage\": \"en\",\n    \"languages\": [\n      \"en\"\n    ]\n  }\n}\n```\n\n</details>\n\n<details>\n  <summary>\n\nTestservice Microservice .yo-rc.json</summary>\n\n\n\n```\n{\n  \"generator-jhipster\": {\n    \"jhipsterVersion\": \"3.7.1\",\n    \"baseName\": \"testservice\",\n    \"packageName\": \"com.mycompany.myapp\",\n    \"packageFolder\": \"com/mycompany/myapp\",\n    \"serverPort\": \"8081\",\n    \"authenticationType\": \"jwt\",\n    \"hibernateCache\": \"hazelcast\",\n    \"clusteredHttpSession\": false,\n    \"websocket\": false,\n    \"databaseType\": \"sql\",\n    \"devDatabaseType\": \"h2Disk\",\n    \"prodDatabaseType\": \"mysql\",\n    \"searchEngine\": false,\n    \"buildTool\": \"maven\",\n    \"enableSocialSignIn\": false,\n    \"jwtSecretKey\": \"4c51bb3f31ca75ff5d648c95c391cddb654dd434\",\n    \"enableTranslation\": true,\n    \"applicationType\": \"microservice\",\n    \"testFrameworks\": [\n      \"gatling\"\n    ],\n    \"jhiPrefix\": \"jhi\",\n    \"skipClient\": true,\n    \"skipUserManagement\": true,\n    \"nativeLanguage\": \"en\",\n    \"languages\": [\n      \"en\"\n    ]\n  }\n}\n```\n\n</details>\n"},"comment":{"url":"https://api.github.com/repos/jhipster/jhipster-core/issues/comments/257252523","html_url":"https://github.com/jhipster/jhipster-core/issues/60#issuecomment-257252523","issue_url":"https://api.github.com/repos/jhipster/jhipster-core/issues/60","id":257252523,"user":{"login":"deepu105","id":1107223,"avatar_url":"https://avatars.githubusercontent.com/u/1107223?v=3","gravatar_id":"","url":"https://api.github.com/users/deepu105","html_url":"https://github.com/deepu105","followers_url":"https://api.github.com/users/deepu105/followers","following_url":"https://api.github.com/users/deepu105/following{/other_user}","gists_url":"https://api.github.com/users/deepu105/gists{/gist_id}","starred_url":"https://api.github.com/users/deepu105/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deepu105/subscriptions","organizations_url":"https://api.github.com/users/deepu105/orgs","repos_url":"https://api.github.com/users/deepu105/repos","events_url":"https://api.github.com/users/deepu105/events{/privacy}","received_events_url":"https://api.github.com/users/deepu105/received_events","type":"User","site_admin":false},"created_at":"2016-10-31T09:49:35Z","updated_at":"2016-10-31T09:49:35Z","body":"Then you need run the generator again rite so the import jdl sub gen would\nneed some modifications to generate app from the yo-rc file and then\ngenerate entities\n\nThanks & regards,\nDeepu\n\nOn 31 Oct 2016 15:07, \"Mathieu ABOU-AICHI\" <notifications@github.com> wrote:\n\n> Oh? You mean that if I provide a .yo-rc.json, it won't work?\n>\n> Le 31 octobre 2016 05:05:41 GMT+01:00, Deepu K Sasidharan <\n> notifications@github.com> a écrit :\n> >I wont have much time this week. Btw to generate app from JDL would\n> >need\n> >some work on the generator as well\n> >\n> >Thanks & regards,\n> >Deepu\n> >\n> >On 31 Oct 2016 02:47, \"Mathieu ABOU-AICHI\" <notifications@github.com>\n> >wrote:\n> >\n> >> Update: @deepu105 <https://github.com/deepu105> No, not yet anyway.\n> >It\n> >> will be done after I make the JDL create a JHipster app, which is\n> >really\n> >> easy. However, if we make the db type available for the validation,\n> >then we\n> >> win. If you wanna do it, by all means as you've created and updated\n> >it.\n> >>\n> >> —\n> >> You are receiving this because you were mentioned.\n> >> Reply to this email directly, view it on GitHub\n> >>\n> ><https://github.com/jhipster/jhipster-core/issues/60#\n> issuecomment-257179907>,\n> >> or mute the thread\n> >>\n> ><https://github.com/notifications/unsubscribe-auth/\n> ABDlF2febx5ImJlq7t0SrCfEIIcVD_z8ks5q5QldgaJpZM4KA22I>\n> >> .\n> >>\n> >\n> >\n> >--\n> >You are receiving this because you commented.\n> >Reply to this email directly or view it on GitHub:\n> >https://github.com/jhipster/jhipster-core/issues/60#\n> issuecomment-257210048\n>\n> --\n> Mathieu ABOU-AICHI\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/jhipster/jhipster-core/issues/60#issuecomment-257250205>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/ABDlF1v7hkxQIjgBz0nD__d9kzHxkEFaks5q5bbTgaJpZM4KA22I>\n> .\n>\n"}}
{"actor":{"display_login":"deepu105"}}