Viktor,
It's a valid point, and I would where possible but I've got quite a
lot of uni-directional references (for example, addressable locations
in a city) where using a mapping would entail very large fetches that
are better handled by querying the database. Evans in Domain Driven
Design is very keen on uni-directional references and who am I to
argue :-)
Tim


On Apr 27, 9:10 pm, Viktor Klang <[email protected]> wrote:
> Why don't collection mappings work?
>
> Also, from personal experience, mixing persistence-logic in domain objects
> does make you feel somewhat naughty.
>
>
>
> On Mon, Apr 27, 2009 at 9:15 PM, Tim P <[email protected]> wrote:
>
> > Hi
> > I'm looking for some guidance here and I don't think this is addressed
> > in the book.
>
> > I've got domain classes that need to go get stuff from the database
> > "list all ... " type of methods.
> > So presumably my domain class should have, or be allowed to have
> > methods that access Model
> > But my unit tests need to test these methods. So I need a model which
> > is instantiated within the test environment and so does not need to be
> > extended with RequestVarEM which presumably would be a bad thing
> > (though perhaps it's harmless).
> > Any suggestions on "best practice" to achieve this? (I'm still very
> > much trying to find my way round natural scala constructs)
>
> > Should it be mentioned in the jpa chapter in the book?
>
> > Tim
>
> --
> Viktor Klang
> Senior Systems Analyst
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to