Permalink
Browse files

Fixed codegen cyclic dependency on table 'Table' and added tests

Removed unnecessary test

Being a good boy scout
  • Loading branch information...
1 parent 6c638ea commit 034ca4b85777b373488353cefc5dbc96baf9231f @trevorsibanda trevorsibanda committed May 16, 2016
@@ -143,7 +143,7 @@ implicit def ${name}(implicit $dependencies): GR[${TableClass.elementType}] = GR
val prns = parents.map(" with " + _).mkString("")
val args = model.name.schema.map(n => s"""Some("$n")""") ++ Seq("\""+model.name.table+"\"")
s"""
-class $name(_tableTag: Tag) extends Table[$elementType](_tableTag, ${args.mkString(", ")})$prns {
+class $name(_tableTag: Tag) extends profile.api.Table[$elementType](_tableTag, ${args.mkString(", ")})$prns {
${indent(body.map(_.mkString("\n")).mkString("\n\n"))}
}
""".trim()
@@ -25,3 +25,9 @@ CREATE TABLE "PERSON"(
"ID" NUMBER(11,0) NOT NULL,
"PERSON_TYPE" CHAR(1) DEFAULT 'Y' NOT NULL
);
+
+CREATE TABLE "Table" (
+ "ID" NUMBER(11,0) NOT NULL,
+ "NAME" VARCHAR NOT NULL ,
+ "COLUMN_COUNT" INTEGER NOT NULL
+);

0 comments on commit 034ca4b

Please sign in to comment.