|
||||||||
|
This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira |
||||||||
------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________ Mifos-issues mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mifos-issues

I've attached file "m_client DatatablesExamples.sql". This shows the mysql DDL that is used to create a "one to one" and a "one to many" m_client related datatable.
The key thing is that certain ddl is 'boilerplate' when creating a datatable and the Primary Key or Foreign Key fields shouldn't be sent/received via the api... but a flag to say whether the table is "one to one" or "one to many" is required on creation (but could default to false). e.g. multiRow=true could mean "One to Many".
example api for POST (create) might be:
{
apptableName: "m_client",
datatableName: "my data table",
multiRow: true,
columns:
{ [name: "Field 1", type: "Text", mandatory: true], [name: "Field 2", type: "String", length=80, mandatory: false], [name: "Field 3", type: "Decimal", mandatory: false], [name: "Field 4", type: "Integer", mandatory: false], [name: "Field 5", type: "Date", mandatory: false], [type: "CodeValue", codeName: "gender", mandatory: false], [type: "CodeData", codeName: "occupation", mandatory: false], [name: "mothers", type: "CodeValue", codeName: "occupation", mandatory: false], }}
Suggested Rules for table names and column names
-------------------------------------------------------------------
Basically take what the user gives you and don't alter it except due to the column naming conventions mentioned in the wiki link in the description. UI can translate the datatable name if necessary but user will typically type in something meaningful to their use. The rules do need to adhere to mysql naming standards and also to _javascript_ ID standards (except it handles spaces as well). So keep it overly simple like
Rule:less than 50 character length
Rule: alphanumerics and spaces and underscores are allowed, others not.
I'll leave possible rules for managing the PUT (update) for later if Lech or others want help on that (probably not)
i.e. ALTER table commands and whether warning should be shown when columns are deleted or changed)