Git Product home page Git Product logo

orm's Issues

Changing schemas/entities

Hello
I am looking for an ORM to use.
One of my requirements would be migrations.
Does Opis handle changes to schemas?

I mean, my concept of migration would be modifying schema without logging changes like phinx does. I have other methods to do that.

Thank you
Best regards
jarodium

Filters with middle entity join

Hello;
I have 3 entities (tables):

  • assets (models)
  • models (manufacturers)
  • manufacturers

I want to list all assets for specific manufacturer using filters in asset entity.
How to do it?

Improve DataMapper wasModified() behavior

Hi,

love your database libraries. Unfortunately I cannot do a Pull request.

I have a few issues to report which you might be interested in:

Issue 1:
Opis\ORM\Core\DataMapper->setColumn()
When calling the function with the same value as already set previously I expect $orm->wasModified() to return false not true.

My "dirty fix" looks like that:

    public function setColumn(string $name, $value)
    {
           .....
           if (isset($this->rawColumns[$name])){        
                 if($this->rawColumns[$name] == $value){                   
                      return;
                }
           }
    
           $this->modified[$name] = 1;
           unset($this->columns[$name]);
           $this->rawColumns[$name] = $value;
    }

Issue 2:
some parts of the IDE auto completion do not work especially when querying from the orm object:
(Using netbeans 12.2)
$orm->query(test::CLASS)-> this works for most cases, get() does not work.
$orm->query(test::CLASS)->withSoftDeleted(true)-> limited only, no get() etc.
$orm->query(test::CLASS)->where(...)->like(...)-> not working at all

I found out changing some traits to public instead of protected does the thing. Don´t know if this is a change you want to do or not.

If nothing of this is in your interest, just close the issue.

Br

Is there a dump/debug query feature?

I am wondering if Opis ORM or DBAL provides a way to debug the query executed like Eloquent does, like toSql() method or listen on query event

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.