fwbrasil / activate

Abandoned: Pluggable persistence in Scala
GNU Lesser General Public License v2.1
299 stars 46 forks source link

How can I deal with column name "id" if the table is already existed? #140

Closed jihlee closed 10 years ago

jihlee commented 10 years ago

Hi guys, I'm trying to adapt activate into my project.

The problem I have now is that there is a column name "id" in my old table.

As I understand, I gotta create "somewhat like a dto" class which can express my table. The problem is "id" variable is already declared in net.fwbrasil.activate.entity.id.UUID class, so that I cannot declare id column in my class.

Is there any turnaround here?

Thank you.

jihlee commented 10 years ago

There is EntityWithCustomID class... I think I can use that class.

However, I would ask you guys if there is any way to define column name which is same with already declared variables in Entity class.

fwbrasil commented 10 years ago

Hi @monesprit54.

The Entity trait has two declared variables: "id" and "version". It isn't possible to modify their name.