Browse Source

* README additions for new tags

Erik Winn 5 years ago
parent
commit
5cb77c381d
1 changed files with 6 additions and 4 deletions
  1. 6
    4
      README

+ 6
- 4
README View File

@@ -207,10 +207,11 @@ The templates use ctemplate and currently support the following tags:
207 207
     "COLUMN_NAME"  = eg. "user_name"
208 208
     "COLUMNS_separator"   = Actually a section - strings inside will be repeated for every column except the last.
209 209
     "DATATYPE"   = int, char, short, std::string, etc.
210
-    "FOREIGNKEY_CLASSNAME"   = eg. Session (foreign key in users table) -- many to one; HAS_MANY section
210
+    "FOREIGNKEY_CLASSNAME"   = eg. Session (foreign key in users table) -- one to many; HAS_MANY section
211 211
     "FOREIGNKEY_CLASS_PLURAL"  = eg. Sessions
212
-    "REFERENCED_CLASSNAME"  = eg. UserType (foreign key to user in user_type table) -- one to many; BELONGS_TO section
213
-    "REFERENCED_TABLENAME"  = eg. "user_type"
212
+    "REFERENCED_CLASSNAME"  = eg. UserType (foreign key to user in user_type table) -- many to one; BELONGS_TO section
213
+    "REFERENCED_TABLENAME"  = eg. "user_type"  -- many to one; BELONGS_TO section
214
+	"REFERENCED_VARIABLE_NAME" = eg. "userTypeId" - the foreign key variable  -- many to one; BELONGS_TO section
214 215
     "VARIABLE_NAME"  = eg. userName
215 216
     "VARIABLE_GETTOR"   = eg. getUserName
216 217
     "VARIABLE_SETTOR"   = eg setUserName
@@ -220,7 +221,8 @@ The templates use ctemplate and currently support the following tags:
220 221
     "INCLUDE"  = eg. "#include usertype.h"
221 222
   
222 223
   In PK_SECTION:
223
-    "PRIMARY_KEY"  = the class member that represents the primary key column, eg. userName or userId
224
+    "PK_VARIABLE_NAME"  = the class member that represents the primary key column, eg. userName or userId
225
+    "PK_COLUMN_NAME"  = the database name the primary key column, eg. user_name or user_id
224 226
 Note that multi column keys will generate duplicate sections for each key - edit/select as needed in the generated classes (or don't use multi column keys)
225 227
 	
226 228
 There are several example templates under: