Jon <[email protected]> writes:
[...] > From what I've done this far, it seems I got the db.driver, db.url, > db.user and db.password right, because I got an exception that said > the user table could not be created. The call to Schemifier.schemify in Boot.scala will try to create the tables for you. If you have existing tables, just remove this line. I'm creating tables manually since I'm using Postgres and Schemifier doesn't seem to work with other schemas than "default" > I then removed the User.scala (and refs to User in Boot.scala), and > tried to create another .scala in model to match parts of an existing > table, but I haven't figured out how to do that properly yet. I tried > to copy some basics (KeyedMapper, MappedString) from this page: > http://wiki.liftweb.net/index.php/HowTo_create_a_basic_CRUDI will try > some more tomorrow. Here's a very simple example (albeit not with compound keys) class Brand extends LongKeyedMapper[Brand] with IdPK { def getSingleton = Brand object oem extends MappedPoliteString(this, 64) object brand extends MappedPoliteString(this, 64) { override def dbColumnName = "mycolumnname" } } object Brand extends Brand with LongKeyedMetaMapper[Brand] { override def dbTableName = "brands" } /Jeppe --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
