ehmpathy / sql-dao-generator

Generate data-access-objects from your domain-objects
MIT License
0 stars 0 forks source link

support domain-object name aliases #8

Open uladkasach opened 2 years ago

uladkasach commented 2 years ago

for example,

export class AsyncTaskRemindJobOwnerToAddPhotos
  extends DomainEntity<AsyncTaskRemindJobOwnerToAddPhotos>
  implements AsyncTaskRemindJobOwnerToAddPhotos
{
  public static alias = 'task';
}

should:

  1. require that the alias is present inside of the domain-object name (i.e., enforce some relationship)
  2. create the dao methods that use the alias as the input variable name instead of the full name (i.e. upsert({ task }) instead of upsert({ asyncTaskRemindJobOwnerToAddPhotos })