datanucleus / datanucleus-scala

DataNucleus support for Scala language features
1 stars 5 forks source link

Problem with Option and column names #3

Closed kurtie closed 7 years ago

kurtie commented 7 years ago

Hi,

I don't know if this is the place for this. I apologize if it is not, but it is the best one I could find.

I was able to figure how to use datanucleus-scala for using scala Option in persistent fields, but it only works when the name of the field and the name of the database row are the same. For instance:

@persistent
@column(name = "pais_telcode", jdbcType = "VARCHAR")
var phoneCode: Option[String] = None

Does not work as pais_telcode is ignored. It works if I do:

@persistent
var pais_telcode: Option[String] = None

Because the field name now is the same as the row in database. Maybe I am doing something wrong?

Best, Kurt.-

renataogarcia commented 7 years ago

Hi Kurt,

It's probably a bug - I'll have a look and let you know.

renataogarcia commented 7 years ago

datanucleus/datanucleus-rdbms#137 - should fix this.

kurtie commented 7 years ago

I downloaded the nightly build and works like a charm. Thanks a lot!