package share.model;
import ufront.db.Object;
import sys.db.Types;
@:table("me_coord")
class Coord extends Object{
public var latitude : SFloat;
public var longitude : SFloat;
public var altitude : SFloat;
public function new(x : Float, y : Float, z : Float) {
super();
this.latitude = x;
this.longitude = y;
this.altitude = z;
}
}
var c = new Coord(1,2,3);
c.save();
share_model_Coord::$manager = new sys_db_Manager(_hx_qtype("share.model.Coord"));
--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/d/optout.
I have this basic ufront-orm Object :
package share.model;
import ufront.db.Object;
import sys.db.Types;
@:table("me_coord")
class Coord extends Object{
public var latitude : SFloat;
public var longitude : SFloat;
public var altitude : SFloat;
public function new(x : Float, y : Float, z : Float) {
super();
this.latitude = x;
this.longitude = y;
this.altitude = z;
}
}
When I try to create a new Coord like this :
var c = new Coord(1,2,3);
c.save();
In php it throw an error : Trying to get property of non-object (errno: 8) in /srv/http/lib/sys/db/Manager.class.php at line #45
however if I set up a neko task that does the same, it works just fine...
It seems that the
Coord Manager isn't properly initialized because
php_Boot::$skip_constructor is true when the manager is created,
which is weird because the only way for it to be true is if it was
instantiated via the Type.createEmptyInstance() method, but it isn't.
This is the php generated by ufront (or spod ?) that instantiate the manager :
public function sendReport(type : ReportType, pos : Coord);