If you didn't yet send it also to lift-announce. ------------------------------------- Mads Hartmann Jensen<mads...@gmail.com> wrote:
Ah yeah I see, it would be looking for a column named blob_c then, right? So what do you say - I send out a **Potential breaking change** message that states that if 'blob' is not a keyword in your DB and you're currently using blob as a column name you should change it to blob_c? On 04/03/2010, at 22.16, Ross Mellgren wrote: > It would be breaking only if somebody were using a database backend where > it's NOT a keyword and also had a mapper field called "blob", right? > > Seems pretty unlikely, but that's just my opinion. > > -Ross > > On Mar 4, 2010, at 4:13 PM, Jim Barrows wrote: > >> On Thu, Mar 4, 2010 at 2:10 PM, Mads Hartmann Jensen <mads...@gmail.com> >> wrote: >> This has already been on reviewboard and comitted to master - should i send >> out a breaking change note? >> >> I'm not sure i get why this is a breaking change though? >> >> >> Not sure if it is. However it's certainly something folks will want to >> upgrade to asap. >> >> Naming columns keywords in SQL is bad. >> >> >> >> On 04/03/2010, at 22.07, Jim Barrows wrote: >> >>> On Thu, Mar 4, 2010 at 1:47 PM, Naftoli Gugenheim <naftoli...@gmail.com> >>> wrote: >>> Is blob a standard reserved word or only on MySQL? >>> If the latter this is a potential breaking change. >>> >>> Blob is not apparently part of the ANSI standard reserved word for SQL. I >>> would have sworn it was. However, it is common in Oracle, MS SQL server >>> and others. Might as well be standard. >>> >>> >>> >>> ------------------------------------- >>> Mads Hartmann<mads...@gmail.com> wrote: >>> >>> Ah! That fixed it, thanks a lot Jeppe ;) >>> >>> I'm not sure what to say in the ticket though, the column-name blob >>> was a bad choise made by me. >>> >>> On Mar 4, 1:32 pm, Jeppe Nejsum Madsen <je...@ingolfs.dk> wrote: >>> > On Thu, Mar 4, 2010 at 1:25 PM, Mads Hartmann <mads...@gmail.com> wrote: >>> > > Hello everyone, >>> > > I'm not sure if this is a lift problem or it's me. I'm trying to add >>> > > the ability to upload images to a project - I'm using the code >>> > > explained here: >>> > >http://groups.google.com/group/liftweb/browse_thread/thread/b0509263e... >>> > >>> > > I added two mapper classes: >>> > > ------- >>> > > class ImageInfo extends LongKeyedMapper[ImageInfo] with IdPK { >>> > > def getSingleton = ImageInfo >>> > >>> > > object date extends MappedLong(this) { >>> > > override def defaultValue = Helpers.millis >>> > > } >>> > > object mimeType extends MappedPoliteString(this, 64) >>> > > object name extends MappedPoliteString(this, 256) { >>> > > override def dbIndexed_? = true >>> > > override def defaultValue = "" >>> > >>> > > private def noSlashes(s: String) : List[FieldError] = >>> > > if (s.contains("/")) >>> > > List(FieldError(this, Text("Image name >>> > > \"" + s + "\" may not >>> > > contain \"/\""))) >>> > > else >>> > > Nil >>> > >>> > > override def validations = >>> > > valMinLen(1, "Image name must not be empty") _ :: >>> > > valUnique("Image name must be unique") _ :: >>> > > noSlashes _ :: >>> > > super.validations >>> > > } >>> > >>> > > object blob extends MappedLongForeignKey(this, ImageBlob) >>> > >>> > > def deleteWithBlob { >>> > > this.blob.obj match { >>> > > case Full(x) => x.delete_! >>> > > case _ => >>> > > } >>> > > this.delete_! >>> > > } >>> > > } >>> > > --------- >>> > > and >>> > > ---------- >>> > > class ImageBlob extends LongKeyedMapper[ImageBlob] with IdPK { >>> > > def getSingleton = ImageBlob >>> > >>> > > object image extends MappedBinary(this) >>> > > } >>> > > --------- >>> > >>> > > The schemifier couldn't create the tables it gave to following >>> > > error :: >>> > > You have an error in your SQL syntax; check the manual that >>> > > corresponds to your MySQL server version for the right syntax to use >>> > > near 'blob BIGINT UNSIGNED) ENGINE = InnoDB' at line 1 >>> > >>> > > this is the sql statement it tried to execute >>> > >>> > > CREATE TABLE imageinfo (name VARCHAR(256) , id BIGINT UNSIGNED NOT >>> > > NULL AUTO_INCREMENT UNIQUE KEY , date_c BIGINT , mimetype >>> > > VARCHAR(64) , blob BIGINT UNSIGNED) ENGINE = InnoDB >>> > >>> > I looks like it tries to create a column named blob, afaiks blob is a >>> > reserved word in >>> > MySqlhttp://dev.mysql.com/doc/refman/5.0/en/reserved-words.html >>> > >>> > You could try renaming the field. If this solves the problem, please >>> > file a ticket >>> > >>> > /Jeppe >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Lift" group. >>> To post to this group, send email to lift...@googlegroups.com. >>> To unsubscribe from this group, send email to >>> liftweb+unsubscr...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/liftweb?hl=en. >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Lift" group. >>> To post to this group, send email to lift...@googlegroups.com. >>> To unsubscribe from this group, send email to >>> liftweb+unsubscr...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/liftweb?hl=en. >>> >>> >>> >>> >>> -- >>> James A Barrows >>> >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Lift" group. >>> To post to this group, send email to lift...@googlegroups.com. >>> To unsubscribe from this group, send email to >>> liftweb+unsubscr...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/liftweb?hl=en. >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Lift" group. >> To post to this group, send email to lift...@googlegroups.com. >> To unsubscribe from this group, send email to >> liftweb+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/liftweb?hl=en. >> >> >> >> -- >> James A Barrows >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Lift" group. >> To post to this group, send email to lift...@googlegroups.com. >> To unsubscribe from this group, send email to >> liftweb+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/liftweb?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups > "Lift" group. > To post to this group, send email to lift...@googlegroups.com. > To unsubscribe from this group, send email to > liftweb+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.