You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Niko Ustinov <nu...@gmail.com> on 2010/05/27 14:40:09 UTC
Re: Mapping a Complex Object
Well, not so unique design practice now, i think.
I'm trying now to implement solution based on scala & iBatis and want to use
scala's case classes for domain model. But common way to initialize such
objects is parametrizing through constructor.
so, i have (for example) such definitions:
trait BaseDTO
case class Item (id: Int, Name: String, Caption: String) extends BaseDTO
case class Order (id: Int, Name: String, Caption: String, Items:
Option[Array[Field]]) extends BaseDTO
so because class members (by default) are val's here (and immutable), i need
to pass array of constructed items to Order's constructor.
Do you have any suggestion how i can do it with iBatis?
Thanks. Nikolay
Clinton Begin wrote:
>
> I'm not aware of any O/R mapper that would elegantly handle a micro-typed
> domain. Since frameworks are largely built for commodity application of
> common practices, I'm not sure one will be easily found. This is a unique
> design practice, and thus will require a unique solution.
>
> Clinton
>
>
--
View this message in context: http://old.nabble.com/Mapping-a-Complex-Object-tp26961927p28693487.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org