Hi Er Galvao,

if you want to use the SequenceFeature you should pass it in the
TableGateway constructor.
The third parameter of TableGateway construct() is a $feature object (that
is null by default).
You can also set the TableGateway object using the setTableGateway() method
of SequenceFeature.
Without one of these two options the $tableGateway property of
SequenceFeature will be empty.

Regards,
Enrico Zimuel


On Wed, Sep 30, 2015 at 2:10 AM, Er Galvao Abbott <[email protected]>
wrote:

> Hi everyone.
>
> So, I'm teaching a ZF2 101 course on a company that uses Oracle and for
> some irrelevant reason doesn't want to create a pre-insert trigger to
> call a sequence.
> After some searching and poking on ZF's code, I've came up with this
> example[1] for a solution for the "save" method (in particular lines 14
> and 15).
>
> It seems to make perfect sense, but for some reason, I get the "Trying
> to get property of non-object", on line 84 of SequenceFeature, so it
> seems that it's not recognizing $this->tableGateway.
>
> Mind that:
>
>  1. I'm using everything else directly from the Skeleton tutorial
>     (including using ServiceManager to configure the table gateway)
>  2. We've dealt with Oracle's upper and lower case issues.
>  3. Every single other example on CRUD works, and even using a static id
>     works as well, so it's not DB-related.
>
> Can anyone shed some light on this? Am I doing wrong from the start and
> there's a better/more recommended way to do it?
>
> [1] - https://gist.github.com/galvao/037138322b642ab0b823
>
> Cheers,
>
> --
> Er Galvão Abbott
>
> --
> List: [email protected]
> Info: http://framework.zend.com/archives
> Unsubscribe: [email protected]
>
>
>


-- 

Enrico Zimuel
Senior Software Engineer | [email protected] Team           |
http://apigility.orgZend Framework Team      |
http://framework.zend.comZend Technologies Ltd.http://www.zend.com

Reply via email to