How to change properties names when you extend models

10 views
Skip to first unread message

Johan Moncada

unread,
Jan 6, 2018, 10:55:38 PM1/6/18
to LoopbackJS
Hey there,

I am new with loopback and I have been reading a lot but I have some doubts yet. I have a couple of question that I really appreaciate if you help me with them:

1. Keep in your mind that: I have a model Customer that extend from User and I am using MySQL DB with automigrate 

Automigrate function created tables in my DB but it added some columns that aren't required in accordance with my business logic, for example: I don't want to have username column or realm column, How can I avoid loopback creates these column?

2. As well I have a model which extend from Roles but I want to rename some columns: the column "modified" I want it named updatedAt, How can I rename columns (properties) name when they come from build-in model?

Al time when I talked about columms I am meaning the models properties.

Thanks so much in advance.



Reply all
Reply to author
Forward
0 new messages