[AC-453] Arrow - can't create a model based on a view
| GitHub Issue | n/a | 
|---|---|
| Type | Bug | 
| Priority | n/a | 
| Status | Resolved | 
| Resolution | Needs more info | 
| Resolution Date | 2015-11-11T02:39:15.000+0000 | 
| Affected Version/s | Appcelerator Studio 4.3.0 | 
| Fix Version/s | n/a | 
| Components | Alloy | 
| Labels | n/a | 
| Reporter | Mitch Starnes | 
| Assignee | Shak Hossain | 
| Created | 2015-10-11T21:16:44.000+0000 | 
| Updated | 2015-11-11T14:37:22.000+0000 | 
Description
	appc run
Appcelerator Command-Line Interface, version 5.0.2
Copyright (c) 2014-2015, Appcelerator, Inc.  All Rights Reserved.
INFO   | Arrow/1.2.62 OSD/1.0.0
INFO   | APIKey is: ---
INFO   | starting connector/appc.mssql@1.1.3
{color:red}INFO   | Skipping generation of model from table vappointments because it has no primary key in the schema.{color}
INFO   | started connector/appc.mssql
INFO   | starting connector/appc.arrowdb@1.1.3
INFO   | started connector/appc.arrowdb
INFO   | Access the Arrow admin at http://127.0.0.1:8080/arrow. This will only be available on your dev environment. To enable in production, set enableAdminInProduction in your config
INFO   | Access the Arrow API doc at http://127.0.0.1:8080/apidoc
INFO   | started
INFO   | server started on port 8080
I want to create a model based on several tables including multiple instance of the same table (PERSON) where different people serve different roles. So, there is one row for OFFICE_VISIT but then there are two joins to the PERSON table for 1) the patient and 2) the provider. 
I have been unsuccessful in defining a model based on multiple instances of the PERSON  table - Is there a way?
Because I was unsuccessful, I decided to create a view that includes all the tables in a join. The view works but Arrow refuses to build a model because there is no primary key.
Hello [~mitch.starnes@bnsf.com], Are you following this doc link [here](http://docs.appcelerator.com/platform/latest/#!/guide/Arrow_Models-section-43299044_ArrowModels-CreateaCompositeModel). You can also look at this [blog post](http://www.appcelerator.com/blog/2015/06/arrow-builder-salesforce-composite-connector/). Thanks.
This was resolved with an unanswered question? The issue is that I can't create a model on a VIEW apparently because there is no primary key (on a view).
Let me add that you can't create a composite model when the joined tables have multi-column primary keys.