I don't have an answer, but does it work if you import model._ ? Derek
On Sun, Mar 29, 2009 at 12:23 PM, bradford <fingerm...@gmail.com> wrote: > > I have two models in separate .scala files. One of them is a > ForeignKey to the other. The problem I'm having is that it won't let > me import the Foreign model, since I have not defined a companion > object. And if I do define a companion object, I get a NetBeans > warning saying, "imported `Courses` is permanently hidden by > definition of object Courses in package model. > > What do I need to change? > > === Courses.scala === > package com.n.hello.model > > import _root_.net.liftweb.mapper._ > > class Courses extends KeyedMapper[Long, Courses] { > def primaryKeyField = id > > object id extends MappedLongIndex(this) > object name extends MappedString(this, 25) > } > > object Courses extends Courses with KeyedMetaMapper[Long, Courses] { > > } > > === Teachers.scala === > package com.n.hello.model > > import _root_.net.liftweb.mapper._ > // import model.Courses // <-- problem if I add this line w/ or w/out > companion object defined in Courses > > class Teachers extends KeyedMapper[String, Teachers] { > def primaryKeyField = nick > > object nick extends MappedStringIndex(this, 10) > object course_id extends MappedLongForeignKey(this, Courses) > } > > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---