Thanks Jeppe!
On Jul 21, 10:04 pm, Jeppe Nejsum Madsen <[email protected]> wrote:
...
> 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
I have now managed to list out some values from one of our Oracle
tables. ;-)
My model code looks something like this:
object AppTekst extends AppTekst with KeyedMetaMapper[String,
AppTekst] {
override def dbTableName = "xx_AppTekst"
}
class AppTekst extends KeyedMapper[String, AppTekst] {
def getSingleton = AppTekst
def primaryKeyField = appTekstKode
object appTekstKode extends MappedStringIndex(this, 30)
object verditekst extends MappedPoliteString(this, 4000)
}
Tomorrow I'll look into composite keys.
I've found this page:
http://wiki.liftweb.net/index.php/HowTo_setup_composite_keys
/Jon
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---