On Sat, Oct 4, 2008 at 12:29 PM, Charles F. Munat <[EMAIL PROTECTED]> wrote:
> > That worked. Thanks! > > (And I like List(x,y) better than the x :: y syntax anyway.) Scalac looks only at the right-most element when type inferencing the a :: b :: c :: Nil statement where it looks at all the elements in List(a,b,c) It usually doesn't matter, but the compiler isn't great at finding the common trait among the c and b elements and chooses things like "Object" > > > Chas. > > David Pollak wrote: > > Charles, > > > > Try: > > > > override def fieldOrder = List(id, name, desc, isArchived) > > > > Sometimes the type inferencer doesn't do the best job. > > > > If that doesn't work, I'll give you another trick I use. > > > > Thanks, > > > > David > > > > Charles F. Munat wrote: > >> When I add a boolean to the fieldOrder list, maven runs out of heap > >> space on compile. As far as I can tell, the fieldOrder list becomes > >> infinite. Here is an example: > >> > >> object Thing extends Thing with KeyedMetaMapper[Long, Thing] { > >> override def dbTableName = "things" > >> override def fieldOrder = id :: name :: desc :: isArchived :: Nil > >> } > >> > >> > >> class Thing extends KeyedMapper[Long, Thing] { > >> def getSingleton = Thing > >> def primaryKeyField = id > >> > >> object id extends MappedLongIndex(this) > >> > >> object name extends MappedString(this, 255) > >> > >> object desc extends MappedString(this, 255) > >> > >> object isArchived extends MappedBoolean(this) { > >> override def defaultValue = false > >> } > >> > >> } > >> > >> If I remove "isArchived" from the fieldOrder list, everything compiles > >> and works fine. If I put it in, I run out of heap space. > >> > >> Any ideas? > >> > >> Chas. > >> > >> > > > > > > > > > > > -- Lift, the simply functional web framework http://liftweb.net Collaborative Task Management http://much4.us Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---