Helma Logo
main list history

Version 13 by zumbrunn on 12. May 2008, 15:38

Version 12 by anton on 08. May 2008, 17:07

1### under construction ###
2
22Lets map the image_data to our image.image!
29This code is in the type.properties file of our Image prototype. We specify which prototype should be mapped with the Object() instruction. You have to specify the name of the prototype here. To the properties.local and .foreign you must assign the names of database columns.

Version 11 by anton on 08. May 2008, 16:58

3<b>Naming-Conventions:</b><b>Naming conventions</b>
14

Version 10 by anton on 08. May 2008, 16:58

15<b>DB schema</b>
17<b>Mapping</b>
20
21<b>Mapping</b>
22
24   imageData          = collection(ImageData)Object(ImageData)
25   imageData.local    = image_id
26   imageData.foreign  = images_image_id

Version 9 by anton on 08. May 2008, 15:07

17<% this.image name="1-to-11-to-1-relation.jpg" %>

Version 8 by anton on 08. May 2008, 15:03

17<% this.image name="1-to-1.jpg" prefix="#" suffix="#" %>
18<!-- <img src="http://dev.helma.org/static/files/2657/1-to-1.jpg" alt="Helma 1:1 Relation" /> -->

Version 7 by anton on 08. May 2008, 15:03

17<% this.image name="1-to-1.jpg" prefix="#" suffix="#" %>
18<!-- <img src="http://dev.helma.org/static/files/2657/1-to-1.jpg" alt="Helma 1:1 Relation" />/> -->

Version 6 by anton on 08. May 2008, 14:55

18<img src="http://dev.helma.org/static/files/2657/1-to-1.jpg" alt="Helma 1:1 Relation" />

Version 5 by anton on 07. May 2008, 18:05

9Prototype names start with upper case and are camel case. Prototype names are singular.
11Prototype names are singular.
12
24  imageData.foreign  = image_idimages_image_id

Version 4 by anton on 07. May 2008, 18:05

7Prototype names start with upper case and Tablenames are camel caseplural.
8
9Prototype names start with upper case and are camel case.
10
11Prototype names are singular.

Version 3 by anton on 07. May 2008, 17:57

3<% image %><b>Naming-Conventions:</b>
4<% image "1-to-1.jpg" %>
5<% image image="1-to-1All the tables and columns in the database are all lowercase.jpg" %>(Which is quite handy with an Mysql database because the names are case-sensitive if the underlying file system is also case-sensitive. So Mysql Names are case sensitive on Linux but not on Windows.
6
7Prototype names start with upper case and are camel case.
8
9Property- Object- and Collection-Mapping start with lower case and are also camel case.
10
11Foreign keys are prefixed with the name of the table they are referring to.
12
13
14<b>Mapping</b>
15
16Lets map the image_data to our image.
17
18<b>Image/type.properties</b>
19  imageData          = collection(ImageData)
20  imageData.local    = image_id
21  imageData.foreign  = image_id

Version 2 by anton on 07. May 2008, 17:40

2
3<% image %>
4<% image "1-to-1.jpg" %>
5<% image image="1-to-1.jpg" %>
6

Version 1 by anton on 07. May 2008, 17:37

1### under construction ###