Guys, I like your suggestions and accept them. What Ross outlined is
quite similar to my last point. I agree that the obscure field names
are undesirable, it was just what I managed to come up with over the
course of an hour's work this afternoon. Like I said, this was just a
first stab since code speaks louder than words, if you will, and I
felt that improving ProtoUser/bringing it to Record has been debated
enough that it was time for some actual code.
First, let me just say that I have never used Record. It sounds great
but I'm using SQL databases for my projects. Given this, take what you
will from my comments.
I would like something that is truly persistence-agnostic to the point
where the developer can use an SQL database. This is especially useful
for people coming to Lift from other frameworks where using an SQL
database and the framework's user implementation is standard. We don't
HAVE to please them, of course, but I think we all agree that there's
real value in having both good SQL support and user modeling.
Supporting SQL databases today means Mapper. If the Squerly
integration does happen soon (and I understand it's your, Tim's and
Ross', priority – great!), then are we the Lift community going to
completely depreciate Mapper ASAP? If so, then my desire to also
support Mapper is moot. If not, then I maintain that Mapper support is
reasonable. This requires something more general than even plain
Record and has the added benefit of allowing additional persistence
frameworks, such as JPA.
Ross, if I understand correctly you want to avoid mixing into
MetaRecord because some User entries may live, say, on an SQL database
and others on a Mongo datastore. It's an interesting use case but
seems like it has the potential to get quite tricky. Is there anything
in Record that already does this? How would you suggest handling these
different MetaRecords? Pass some MetaRecord object when creating a
User instance with the opportunity to use the app's default MetaRecord
object? And what about querying for a User? First try one MetaRecord
source and then another?
Just to wrap up, I'm willing to work on a design along whatever lines
we all decide is best but I would like to get my questions answered
first.
Thanks,
Peter
> >> For more options, visit this group athttp://
groups.google.com/group/liftweb?hl=en.
> > For more options, visit this group athttp://
groups.google.com/group/liftweb?hl=en.
> For more options, visit this group athttp://
groups.google.com/group/liftweb?hl=en.