[ALOY-375] Alloy Model Generation providing incorrect adapter type within definition
|Fix Version/s||Alloy 1.0.0, 2013 Sprint 02|
DescriptionGenerate 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")
- Bert Grantges 2013-01-04 bump - still seeing this with version 0.3.4
- Tony Lukasavage 2013-01-04 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.
- Michael Xia 2013-01-04 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?
- Tony Lukasavage 2013-01-05
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:
alloy generate model NAME ADAPTER_TYPE col1:type1 col2:type2 ...
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.
alloy generate model myModel sql name:string value:integer
- Michael Xia 2013-01-06 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".
- Michael Xia 2013-01-07 Created TISTUD-3137.
- Tony Lukasavage 2013-01-24 Primary issue resolved in TISTUD-3137. Additional work providing more uniformity to the creation of models will be done in ALOY-407.