[ALOY-375] Alloy Model Generation providing incorrect adapter type within definition
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2013-01-24T21:04:19.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Alloy 1.0.0, 2013 Sprint 02 |
Components | n/a |
Labels | n/a |
Reporter | Bert Grantges |
Assignee | Unknown |
Created | 2012-11-12T16:16:07.000+0000 |
Updated | 2018-03-07T22:25:59.000+0000 |
Description
Generate a simple model using Ti Studio, note sql is selected by default
Expectation:
Generated Model definition should have 'sql' as the adapter type
Actual:
Generated Model definition shows first column definition (in my case "title:varchar")
bump - still seeing this with version 0.3.4
Adding Chris Williams to watchers to get a Studio guy on this one. In the short term this will likely need a quick fix on the Studio side to account for the fact that the sql adapter has a slightly different format for generation than the other adapters. That is why you are getting the wrong value in the adapter field of the generated model. The long term solution is in the linked ticket (ALOY-407), which states that I need to rework the model generation CLI in order to make it uniform for all adapters so Studio isn't forced to account for these disparities between adapter types.
Hi Tony, I'll open a ticket on the Studio side for the quick fix. So is it that there is a different parameter we need to pass to the CLI for the sql adapter?
I tested this with Alloy 0.3.4 just now and the following format will generate the model appropriately for all supported adapters types: (sql, properties, and localStorage):
so for example, a sql model would be generated like this:
Out of curiosity, what is the exact command TiStudio is calling now to generate models? I'm wondering how this error is occurring in the generation.
We are treating sql adapter type differently than the others, and we have a TODO saying "For now, we don't pass the 'sql' type at the end of the command. Once Alloy update their command API, we'll need to pass that as well." So look like we didn't update it after the alloy change. The command we're calling now is "alloy generate model myModel name:string active:boolean".
Created TISTUD-3137.
Primary issue resolved in TISTUD-3137. Additional work providing more uniformity to the creation of models will be done in ALOY-407.