Enhancement 273 : ENHANCEMENT - Support for Scala Option type
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 Scala Option type (rather than using null) as a parametrised type.

/** 
  * 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;

 }

Note the use of Scala Option for the smallnote property.

 
Rob 11 Apr 23:24
Fixed in HEAD

Fixed in HEAD.

woResponse

Upload a file