문제

I'm creating a small application for my company in Lift. I'm quite a newbie in Scala/Lift so I'm using this chance to practice. Now, I have a question on what ORM system to use.

On one hand, Mapper is the Lift default. On the other hand, I've read it's not good in certain areas and will be replaced by Record (which is not yet well documented, so hard to follow by a new user like me).

Opposite to Mapper we have JPA: standard Java, tested and robust ORM with trusted implementations like Hibernate, but not quite "scala-ish" and you loose the capabilities provided by default by Mapper due to its integration with Lift.

I've read on the mailing lists some assertions that JPA is becoming the way to go for Lift, but it doesn't seem a widespread opinion. Somebody can bring some light into the matter?

Thanks!

도움이 되었습니까?

해결책

It depends on what you need. If you have a model that is heavily using inheritance and one/many-to-many relationships then you might be better off with JPA.

However if you want rapid turnaround, Mapper is the way to go. Mapper/Crudify are a great scaffolding pair, and that power is hard to beat.

다른 팁

다음과 같은 비즈니스 논리를 구현할 수 있습니다 :

  • 트리거가있는 데이터베이스 (다른 답변 참조)
  • 부분 방법을 사용하여 linq2sql을 사용하여 VB 코드 :

    예제 http://msdn.microsoft.com/en-us/도서관 / bb546176.aspx

    Partial Class Customer
        Private Sub OnAddressChanged()
            ' Insert business logic here.
        End Sub
    End Class
    
    .

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top