Git Product home page Git Product logo

wordpress-orm's People

Contributors

den-v avatar fadupla avatar joworeiter avatar quangthien27 avatar rjjakes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

wordpress-orm's Issues

Relational data

Hi!!

Thanks for your wonderful package! It helps me a lot while working on some plugins.
I was just wondering how the status is with relational data?

I found these properties
@ORM_ManyToOne \Symlink\ORM\Models\Users @ORM_JoinProperty ID
But that's basically it. I can't get them to work, and I don't really understand how they're implemented.

If you were to provide me with some information about the implementation, I'll be glad to contribute to the repo!

All the best,
Arne

Indexes

How do I add database indexes to the columns?

Manager try to update an object if a no-managed attribute is changed

What I try to do
Having on a same object some managed attributes and no-managed attributes, for example

/**
 * @ORM_Column_Type smallint
 * @ORM_Column_Null NOT NULL
 */
protected $userId;

/**
 * @var Users
 */
protected $user;

Because there is non relation yet, I set $user after my entity loaded from the DB.

What don't work
When I change a no-managed attribute and I make an make an $orm->flush(), it try to update the database. Because there is no modification on my managed attributes, nothing change on DB and it cause 'Failed to update one or more records in the database.' exception.

What it should be done
The TrackedCollection should only compare the "UnkeyedValues"

Implementation of post meta table

Hi there,
I was wondering if I could offer a Pull Request for the post meta table. But before I would like your opinion on how to implement it.
In a project of mine I did a quick implementation with a trait of BaseModel Class since post_meta doest has an ID column and so it would throw ab error. Eventhough this works, I was wondering if it's not better to create a new abstract class, which contains the Id, so that there is more flexibility on creating own tables.
Thanks for your feedback!

Question on Capabilities/Usage

Hello,
Firstly, this is a question rather than a bug notice, so please excuse me if I am posting this in the wrong place. I am new to GitHub and I could not find any place specifically for questions.
Secondly, let me say that your WordPress ORM project looks very interesting, and I am not sure why I have not read more about it on the internet. Very well done, and thank you for your work.
I myself have been looking for any tool that will give me the ability to store core WordPress default metas as columns in tables WITHOUT the default key-value pair storage system. Can I do this with your ORM tool? But ALSO, can your ORM tool do this AND allow all the WP queries/API to still function with this new schema, without me having to dig through code and make modifications (which, frankly speaking, I do not feel at all comfortable doing)?
As an added bonus, if your ORM tool can do what I described above for WordPress core, can it also be used in the same way with data/metas from any WordPress plugin (even if I have to manually define schemas through code snippets, which I feel fine doing)?
Finally, if your ORM tool cannot provide any of the capabilities I have mentioned, do you know of any tool which can do this? I have only recently come across this type of tool during my research for a solution to my problem, so I am still not fully clear on what I can or cannot do with such a tool. Any clarification you could provide would be very helpful and highly appreciated.
I look forward to your earliest possible response, since I am evaluating options/solutions currently and need to make a final decision in the next 48 hours.

Thank You, and best of success with your beautiful project,
Michael

Get the last inserted id

When using Doctrine the convention is to set the Id in the Entity but that doesn't look to be the case in the library.
Moreover there is no way to get it from the manager too.
So i was thinking how we can get the last inserted ID from this library that looks like copying Doctrine logic?

Get rid of PHP 8.1 deprecations warnings

Since the upgrade to PHP 8.1 we get a ton of deprecation warnings.
This could easily be fixed by adding return types, which are only available since 7.1, so I would advocate to set the min. php version at least to php 7.1 and fix the warnings by adding proper return types, where possible or supress them by adding the willChange-Attribute.

If someone could review my last pull request, I would be deligthed to serve an other one for this ones.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.