ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niko Ustinov <nusti...@gmail.com>
Subject Re: Mapping a Complex Object
Date Thu, 27 May 2010 12:41:38 GMT

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[Item]]) 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


Mime
View raw message