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

PHPORM-243 Alias _id to id in Schema::getColumns() #3160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
GromNaN merged 4 commits into mongodb:5.x from GromNaN:PHPORM-243
Sep 20, 2024

Conversation

@GromNaN
Copy link
Member

@GromNaN GromNaN commented Sep 20, 2024
edited
Loading

Fix PHPORM-243

❯ php artisan model:show book
 App\Models\Book ............................................................. 
 Database ............................................................ mongodb 
 Table ................................................................. books 
 Attributes ...................................................... type / cast 
- _id ..................................................... objectId / accessor 
+ id ...................................................... objectId / accessor 
 author nullable ...................................................... string 
 created_at nullable ......................................... date / datetime 
 description nullable ................................................. string 
 isbn nullable ........................................................ string 
 publication_date nullable ............................................ string 
 title nullable ....................................................... string 
 updated_at nullable ......................................... date / datetime 
- id ................................................................. accessor 

Required for API Platform integration with Laravel: https://github.com/api-platform/laravel/blob/e821ad27072228e4638f3de92d51fc3d15e02c7b/Eloquent/Metadata/ModelMetadata.php#L68

Checklist

  • Add tests and ensure they pass
  • Add an entry to the CHANGELOG.md file

@GromNaN GromNaN modified the milestones: 5.0, 5.1 Sep 20, 2024
@GromNaN GromNaN marked this pull request as ready for review September 20, 2024 10:05
@GromNaN GromNaN requested a review from a team as a code owner September 20, 2024 10:05
Copy link
Member

@alcaeus alcaeus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit regarding a comment, but LGTM other than that

GromNaN reacted with thumbs up emoji
Co-authored-by: Andreas Braun <git@alcaeus.org>
@GromNaN GromNaN enabled auto-merge (squash) September 20, 2024 11:53
@GromNaN GromNaN enabled auto-merge (squash) September 20, 2024 11:54
@GromNaN GromNaN merged commit 716d8e1 into mongodb:5.x Sep 20, 2024
27 checks passed
@GromNaN GromNaN deleted the PHPORM-243 branch September 20, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@alcaeus alcaeus alcaeus approved these changes

Assignees

No one assigned

Labels

Projects

None yet

Milestone

5.1

Development

Successfully merging this pull request may close these issues.

2 participants

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