Enhancement 272 : ENHANCEMENT - Support for Scala mutable Buffer Set and Map types
Priority 
High
Reported Version 
 
Logged By 
Rob
Status 
Fixed
Fixed Version 
2.6.0
Assigned To 
 
Product 
Ebean - core
Duplicate Of 
 
Created 
11/04/2010
Updated 
11/04/2010
Type 
Enhancement
 
Attachments 
No attachments

Add support for using the Scala mutable collection types of Buffer, Set and Map instead of the Java types of List, Set and Map.

package test.s.m

import javax.persistence._
import com.avaje.ebean._
import scala.reflect._ 
import scala.collection.mutable._

 /** 
  * Customer entity bean. 
  */  
 @Entity  
 @Table(name="o_customer")  
 class SCustomer {  
   
   @Id   
   var id:Option[Int] = None;  
       
   var name:String = null;
   
   var smallnote:Option[String] = None;
      
   @OneToMany(mappedBy="customer")
   @JoinColumn(name="customer_id")
   var contacts:Buffer[SContact] = null;

 }

 object SCustomer extends SDao(classOf[SCustomer]) {
                               
 }

Note:

var contacts:Buffer[SContact] = null;


The contacts type is a scala mutable Buffer rather than a java list.

 
Rob 11 Apr 23:22
Fixed in HEAD

fixed in HEAD.

woResponse

Upload a file