profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/tnga/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Tindo N. Arsel tnga Cameroon http://codepen.io/tnga Like working, honesty, perseverance, sports, kids, girls, ... One of my favorite citation by **Gandhi** is: >Be the change you want to see in the world.

tnga/react-aframe 10

Build virtual and augmented reality experiences with React and A-Frame.

tnga/bowerder 6

the bower components loader for browsers

tnga/lib.ijs 2

Mini library for javaScript language. It provide functionalities that facilitate web's project development and it can be associated with all existing JS libraries.

tnga/crud-theclub-m 1

simple test project i create to perform CRUD operation through websocket API, using vue.js and materialize

tnga/lib.iui 1

Simple yet powerful css/es library for building modern web user friendly designs and interfaces

tnga/react-aframe-starter 1

Boilerplate for building virtual and augmented reality experiences with React and A-Frame.

tnga/100-Days-Of-ML-Code 0

100 Days of ML Coding

tnga/adonis-framework 0

NodeJs Web Application Framework. Makes it easy for you to write webapps with less code :smiley:

tnga/animate.css 0

A cross-browser library of CSS animations. As easy to use as an easy thing.

tnga/aos 0

Animate on scroll library

startedsofish/pen

started time in 10 days

startedJiHong88/SunEditor

started time in 10 days

startedblueedgetechno/windows11

started time in 11 days

startedworkos-inc/awesome-developer-experience

started time in 15 days

startedcdr/code-server

started time in 15 days

startedThmen/EGVSR

started time in 15 days

startedultralytics/yolov5

started time in 18 days

startedhome-assistant/core

started time in a month

startedOffcierCia/DeFi-Developer-Road-Map

started time in a month

issue commentadonisjs/lucid

Default pivot table is not well referenced for ManyToMany relationship

Yah! thanks @RomainLanz , well notice @thetutlage .

tnga

comment created time in a month

issue openedadonisjs/lucid

Default pivot table is not well referenced for ManyToMany relationship

Package version

14.2.0

Node.js and npm version

node 14.16.0 & npm 6.14.11

Given the following code with ManyToMany relationship between users table and roles table through user_role table, Adonis may understand to reference the table user_role by default but it seems to reference a the table user_user_role instead. Maybe a double concatenation issue of the pivotForeign table (here the table users) ?

Sample Code (to reproduce the issue)

/// UserModel.ts
import {
  BaseModel,
  manyToMany,
  ManyToMany,
} from '@ioc:Adonis/Lucid/Orm'

import UserRole from 'App/Models/UserRole'
export default class User extends BaseModel {
  @manyToMany(() => UserRole)
  public roles: ManyToMany<typeof UserRole>
}
/// UserSeeder.ts
 import BaseSeeder from '@ioc:Adonis/Lucid/Seeder'
 import Role from 'App/Models/Role'
 import User from 'App/Models/User'

 export default class ManagerSeeder extends BaseSeeder {
  public async run() {
   const admin = new User()
   const admRole = await Role.findBy('tag', 'administrator')
   await admin.save()
   await admin.related('roles').attach([admRole.id]) // got error
   // error: insert into `user_user_role` (`user_id`, `user_role_id`) values (1, 3) 
   // - ER_NO_SUCH_TABLE: Table 'projectdb.user_user_role' doesn't exist
  }
 }

NB: The alternative solution is to use custom pivotTable. But the default behavior have to be sufficient.

created time in a month

issue commentadonisjs/core

Thank you :)

Yeah! Thank you from Cameroon :cameroon: .

mikealche

comment created time in a month

issue openedadonisjs/lucid

Adonis 5 issue on validator addons from lucid package (without migration)

<!-- CLICK "Preview" FOR INSTRUCTIONS IN A MORE READABLE FORMAT -->

Package version

15.0.0

Node.js and npm version

node 15.0.0 & npm 6.14.11

Sample Code (to reproduce the issue)

NB: The error is occurring when using lucid validator extended functions like unique or exists, without migration. The issue is not occurring when running the migration.

It seems like logger instance is not defined when calling logger.fatal. See: @adonisjs/lucid//src/Bindings/Validator.ts#L250

// validating request from corresponding form
Route.post('/', async ({ request, response, logger }) => {
  logger.info("validating form ...")
  const formSchema = schema.create({
    email: schema.string({ trim: true }, [
      rules.required(),
      rules.unique({ table: 'users', column: 'email' })
    ]),
    password: schema.string({ escape: true }, [rules.required()]),
  })

  try {
    await request.validate({schema: formSchema})
  } catch (err) {
    // unexpected issue ?: TypeError: Cannot read property 'fatal' of undefined
    // at Object.validate (/home/prudence/workspace/hello-world/node_modules/@adonisjs/lucid/build/src/Bindings/Validator.js:170:20)
    console.error(err)
    return response.badRequest(err.messages)
  }
  logger.info("... form ok")
  return response.ok('validated!')
})

BONUS (a sample repo to reproduce the issue)

Checkout a pratical overview with the following codesandbox link This following github repo is also a pratical overview of the issue

created time in 2 months

create barnchtngamemo/issue-adonis-lucid-validator

branch : master

created branch time in 2 months

created repositorytngamemo/issue-adonis-lucid-validator

Overview of Adonis 5 possible issue on validator addon from lucid package

created time in 2 months

startedfiorix/freegeoip

started time in 2 months

startedsorenisanerd/gotty

started time in 2 months

startednocodb/nocodb

started time in 2 months

startedgraingert/WOW

started time in 2 months

startedshipshapecode/shepherd

started time in 2 months

startedgwuhaolin/livego

started time in 2 months

startediluwatar/java-design-patterns

started time in 2 months

startedonnx/onnx

started time in 2 months

startedsyncthing/syncthing

started time in 3 months

startedfacebook/folly

started time in 3 months

startedKazhnuz/awesome-gnome

started time in 3 months

startedqarmin/czkawka

started time in 3 months

startedrustdesk/rustdesk

started time in 3 months

startedgoogle/zx

started time in 3 months

startedRenovamen/playground-macos

started time in 3 months