Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Using Customization handler to insert app-generated ID #1021

Open
Assignees
@apps-caraga

Description

I was just trying to use Universally Unique Lexicographically Sortable Identifier ULID with this library and was able to insert the ULID via the multitenancy middleware as follows:

	'multiTenancy.handler' => function ($operation, $tableName) {
			if($operation =='create' && $tableName=='data'){ 
				return['id'=>Ulid::generate()];
			}
		},

With SQLite, the post request is ok (data is saved and response status is HTTP 200) but returns {} or an empty array. Any idea why?

SQLite table schema:

CREATE TABLE data (
 id TEXT (26) PRIMARY KEY
 NOT NULL,
 content TEXT,
 createdAt DATETIME NOT NULL
 DEFAULT (strftime('%Y-%m-%d %H:%M:%fZ') ) 
);

Metadata

Metadata

Projects

No projects

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /