Scala + SQL code generation generates reserved words

Bug #779132 reported by Vesa Marttila on 2011-05-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Querydsl
Fix Released
Undecided
Unassigned

Bug Description

I generated Q-types based on the schema and I ended up with the following field:

val type = createNumber("TYPE", classOf[java.lang.Short])

This of course does not compile because "type" is a reserved word.

Fixed in SVN trunk.

Example output :

object QEscapedWords {
  def as(variable: String) = new QEscapedWords(variable)

  val escapedWords = as("escapedWords")
}

class QEscapedWords(cl: Class[_ <: EscapedWords], md: PathMetadata[_]) extends EntityPathImpl[EscapedWords](cl, md) {
  def this(variable: String) = this(classOf[EscapedWords], forVariable(variable))

  def this(parent: Path[_], variable: String) = this(classOf[EscapedWords], forProperty(parent, variable))

  val `object` = createString("object")

  val type$ = createString("type")

  val `val` = createString("val")

  val `var` = createString("var")

}

Changed in querydsl:
status: New → Fix Committed

Released in 2.2.0.beta5

Changed in querydsl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers