Apologies,

yes, that is what I meant (or rather LongMappedForeignMapper) :
http://scala-tools.org/mvnsites/liftweb-1.1-M6/lift-mapper/scaladocs/net/liftweb/mapper/LongMappedForeignMapper.html

Manohar

On Mar 8, 3:01 pm, Naftoli Gugenheim <naftoli...@gmail.com> wrote:
> You mean MappedLongForeignMapper is deprecated?
>
> -------------------------------------
>
> ojonam<manojo10...@gmail.com> wrote:
>
> Hi Jeppe,
>
> that works indeed, thanks. Although, in 2.0-M2, technically you need
> to extend LongMappedMapper (as MappedForeignKey is deprecated).
> Anyway, here is the little bit of code, if anyone is interested (or
> interested in changing the wiki page for CRUD) :
>
> class Book extends LongKeyedMapper[Book] with IdPK with Ordered[Book]
> {
> def getSingleton = Book
> object author extends LongMappedMapper[Book, Author](this, Author){
>   override def validSelectValues = Full(Author.findAll.map(x => (x.id,
> x.name)))
>
> }
>
> Cheers,
> Manohar
>
> PS : is there a place where I can find the link to the 2.0-M2 API ?
>
> On Mar 8, 9:46 am, Jeppe Nejsum Madsen <je...@ingolfs.dk> wrote:
>
>
>
> > ojonam <manojo10...@gmail.com> writes:
> > > Hello all,
>
> > > I recently tested the wiki example of Book and Authors as an exercise,
> > > and extended them with CRUDify. On generation, however, the "Author"
> > > field in the Book create page says : "Can't Change!", instead of
> > > giving me a select list of all the authors.
>
> > > My question is : Is this normal behavior ? If not, how do I go
> > > repairing this ?
>
> > I assume author is a MappedForeignKey? If so, you need to override
> > validSelectValues.
>
> > Not sure why there isn't a default impl of this though, should be
> > possible....
>
> > /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 
> athttp://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.

Reply via email to