Dude... it's the magic of dbAddTable in the MetaMapper object: in object ToDo... add:
override def dbAddTable = Full(populate _) private def populate { ToDo.create.(....).save } When Schemifier adds a table, it will invoke the function specified by dbAddTable and that's a perfect place to add the default ToDo item. On Wed, Apr 15, 2009 at 9:09 AM, marius d. <marius.dan...@gmail.com> wrote: > > You can probably do that in you Lift Boot class after you DB > connections are setup etc. > > > Br's, > Marius > > On Apr 15, 6:55 pm, Tobias Daub <hannes.flo...@gmx.li> wrote: > > Hi There, > > > > I wanna have some kind of "standard" todo item, that should always be > > there (in the database). I Don't want to create that todo item manually > > by hand, instead I want to create it during boot. Means I wanna check > > everytime when Lift is started, if it already exists and if not, it'll > > be created. > > > > I know that this doesn't make any sense for todo items, but I need it > > for something else. > > > > In which source file should I do that? > > > > thanks > > Tobias > > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 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 liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---