Re: AW: Re: SQL Datasource Changes [1 Attachment]
Tobias Greitzke <[email protected]>
| Newsgroups | gmane.comp.cms.zms.devel |
|---|---|
| Organization | tog.is information design |
| Message-ID | <[email protected]> |
Thanks for the code snippet. That brought some light into the dark.
If I delete the xml there is nothing left to configure. I pasted your
xml code and it works.
Looks like it needs at least the table information to be able to use the
configuration interface:
<list>
<item type="dictionary">
<dictionary>
<item key="id"><![CDATA[anfrage]]></item>
<item key="type"><![CDATA[table]]></item>
</dictionary>
</item>
<item type="dictionary">
<dictionary>
<item key="id"><![CDATA[kategorie]]></item>
<item key="type"><![CDATA[table]]></item>
</dictionary>
</item>
</list>
But adding fields by the configuration results in the index error
because the index is not insert into the xml configuration. Manually
inserting an index makes the configuration work again.
The user interface is still missing (interface.gif)
Is there something I have to do with:
<item key="interface"></item>
Best Regards
Tobias Greitzke
Dr. Frank Hoffmann schrieb:
>
> [Attachment(s) <#TopText> from Dr. Frank Hoffmann included below]
>
> Hello,
> [1]
> please delete the xml but the root element "list" (screen zmssqldb0.gif):
> <list></list>
> [2]
> Reconfiguring the model by "configuration" would provide a simple/fast
> solution. As you can see with Christian Meier's ZMSLabs there was a change
> concerning the letter case. Please check wether the names are identical. In
> the next two weeks I will publish some detailed charts about ER modelling
> with ZMS.
> I remodelled your sql db asuming 'category' is a FK (?); working ER model
> and SQL are following.
>
> I hope this woll help.
> Regards
> fh
>
> ER model (ZMS)
> %<-------------------
> <list>
> <item type="dictionary">
> <dictionary>
> <item key="columns" type="list">
> <list>
> <item type="dictionary">
> <dictionary>
> <item key="auto"><![CDATA[insert]]></item>
> <item key="hide" type="int">0</item>
> <item key="id"><![CDATA[id]]></item>
> <item key="index" type="int">0</item>
> <item key="label"><![CDATA[Id]]></item>
> <item key="pk" type="int">1</item>
> </dictionary>
> </item>
> <item type="dictionary">
> <dictionary>
> <item key="auto"></item>
> <item key="hide" type="int">0</item>
> <item key="id"><![CDATA[date]]></item>
> <item key="index" type="int">1</item>
> <item key="label"><![CDATA[Date]]></item>
> </dictionary>
> </item>
> <item type="dictionary">
> <dictionary>
> <item key="auto"></item>
> <item key="hide" type="int">0</item>
> <item key="id"><![CDATA[name]]></item>
> <item key="index" type="int">2</item>
> <item key="label"><![CDATA[Name]]></item>
> </dictionary>
> </item>
> <item type="dictionary">
> <dictionary>
> <item key="auto"></item>
> <item key="hide" type="int">0</item>
> <item key="id"><![CDATA[email]]></item>
> <item key="index" type="int">3</item>
> <item key="label"><![CDATA[Email]]></item>
> </dictionary>
> </item>
> <item type="dictionary">
> <dictionary>
> <item key="auto"></item>
> <item key="fk" type="dictionary">
> <dictionary>
> <item key="displayfield"><![CDATA[active]]></item>
> <item key="fieldname"><![CDATA[id]]></item>
> <item key="maxlen"><![CDATA[25]]></item>
> <item key="tablename"><![CDATA[kategorie]]></item>
> </dictionary>
> </item>
> <item key="hide" type="int">0</item>
> <item key="id"><![CDATA[category]]></item>
> <item key="index" type="int">4</item>
> <item key="label"><![CDATA[Category]]></item>
> </dictionary>
> </item>
> <item type="dictionary">
> <dictionary>
> <item key="auto"></item>
> <item key="hide" type="int">0</item>
> <item key="id"><![CDATA[text]]></item>
> <item key="index" type="int">5</item>
> <item key="label"><![CDATA[Text]]></item>
> </dictionary>
> </item>
> </list>
> </item>
> <item key="filter"></item>
> <item key="id"><![CDATA[anfrage]]></item>
> <item key="interface"></item>
> <item key="label"><![CDATA[Anfrage]]></item>
> <item key="type"><![CDATA[table]]></item>
> </dictionary>
> </item>
> <item type="dictionary">
> <dictionary>
> <item key="columns" type="list">
> <list>
> <item type="dictionary">
> <dictionary>
> <item key="auto"><![CDATA[insert]]></item>
> <item key="hide" type="int">0</item>
> <item key="id"><![CDATA[id]]></item>
> <item key="index" type="int">0</item>
> <item key="label"><![CDATA[Id]]></item>
> <item key="pk" type="int">1</item>
> </dictionary>
> </item>
> <item type="dictionary">
> <dictionary>
> <item key="auto"></item>
> <item key="checkbox" type="int">1</item>
> <item key="hide" type="int">0</item>
> <item key="id"><![CDATA[active]]></item>
> <item key="index" type="int">1</item>
> <item key="label"><![CDATA[Aktiv]]></item>
> </dictionary>
> </item>
> </list>
> </item>
> <item key="filter"></item>
> <item key="id"><![CDATA[kategorie]]></item>
> <item key="interface"></item>
> <item key="label"><![CDATA[Kategorie]]></item>
> <item key="type"><![CDATA[table]]></item>
> </dictionary>
> </item>
> </list>
> %<-------------------
>
> SQL database
> %<-------------------
> CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER SET latin1 */;
> DROP TABLE IF EXISTS `test`.`anfrage`;
> CREATE TABLE `test`.`anfrage` (
> `id` int(10) unsigned NOT NULL auto_increment,
> `date` date default NULL,
> `name` varchar(45) default NULL,
> `email` varchar(45) default NULL,
> `category` int(10) unsigned default NULL,
> `text` text,
> PRIMARY KEY (`id`)
> ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
> DROP TABLE IF EXISTS `test`.`kategorie`;
> CREATE TABLE `test`.`kategorie` (
> `id` int(10) unsigned NOT NULL auto_increment,
> `active` tinyint(1) default NULL,
> PRIMARY KEY (`id`)
> ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
> %<-------------------
>
>