Giter Club home page Giter Club logo

air-activerecord's People

Watchers

 avatar

air-activerecord's Issues

Two separate project would be easier

It would be easier to have two separate Flex project instead of
test-project inside project root folder.

Recommanded layout:
ROOT
|-ActiveRecord
|  |-trunk
|  |-branches
|  |-tags
|-ActiveRecord-Test
   |-trunk
   |-branches
   |-tags


Original issue reported on code.google.com by [email protected] on 1 Oct 2008 at 7:43

DB.getSchema is failing to return a schema

What steps will reproduce the problem?
1. Create a sqlite db called main.db, and put it in the application directory.

2. Create a table in the database called "People" with id, fname, and lname 
columns.

3. generate a simple class that extends ActiveRecord:
 package 
{
    import flight.db.activeRecord.*;

    public dynamic class Person extends ActiveRecord
    {
        public var fname:String;
        public var lname:String;
    }
}

4. Instantiate that class:
person = new Person();

5. Apply some properties:
person.fname = 'Bill'
person.lname = 'Johnson'

6. save the person
person.save()


What is the expected output? What do you see instead?
===============================
I expect to see a new record in the People database.
Instead I get this error:
===============================
TypeError: Error #1009: Cannot access a property or method of a null object 
reference.
    at 
flight.db.activeRecord::ActiveRecord/http://withincode.com/sql/db::getDBProperti
es()[/Users/Mi
ke/Sites/AR/ActiveRecord_test2/src/flight/db/activeRecord/ActiveRecord.as:544]
    at 
flight.db.activeRecord::ActiveRecord/save()[/Users/Mike/Sites/AR/ActiveRecord_te
st2/src/flight/
db/activeRecord/ActiveRecord.as:138]
    at 
ActiveRecord_test2/init()[/Users/Mike/Sites/AR/ActiveRecord_test2/src/ActiveReco
rd_test2.mxm
l:30]
    at 
ActiveRecord_test2/___ActiveRecord_test2_WindowedApplication1_initialize()[/User
s/Mike/Sites/
AR/ActiveRecord_test2/src/ActiveRecord_test2.mxml:2]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at 
mx.core::UIComponent/dispatchEvent()[E:\dev\3.0.x\frameworks\projects\framework\
src\mx\c
ore\UIComponent.as:9051]
    at mx.core::UIComponent/set 
processedDescriptors()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UI
Componen
t.as:1215]
    at 
mx.core::Container/createComponentsFromDescriptors()[E:\dev\3.0.x\frameworks\pro
jects\fra
mework\src\mx\core\Container.as:3498]
    at 
mx.core::Container/createChildren()[E:\dev\3.0.x\frameworks\projects\framework\s
rc\mx\core
\Container.as:2587]
    at 
mx.core::WindowedApplication/createChildren()[E:\dev\3.0.x\frameworks\projects\a
irframework
\src\mx\core\WindowedApplication.as:1766]
    at 
mx.core::UIComponent/initialize()[E:\dev\3.0.x\frameworks\projects\framework\src
\mx\core\U
IComponent.as:5262]
    at 
mx.core::Container/initialize()[E:\dev\3.0.x\frameworks\projects\framework\src\m
x\core\Cont
ainer.as:2524]
    at 
mx.core::Application/initialize()[E:\dev\3.0.x\frameworks\projects\framework\src
\mx\core\App
lication.as:847]
    at 
ActiveRecord_test2/initialize()[/Users/Mike/Sites/AR/ActiveRecord_test2/src/Acti
veRecord_test2.
mxml:0]
    at 
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::childAdde
d()[E:\
dev\3.0.x\frameworks\projects\framework\src\mx\managers\SystemManager.as:1625]
    at 
mx.managers::SystemManager/initializeTopLevelWindow()[E:\dev\3.0.x\frameworks\pr
ojects\fra
mework\src\mx\managers\SystemManager.as:2482]
    at 
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::docFrameH
andle
r()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\SystemManager.as:
2330]
===============================
===============================


What version of the product are you using? On what operating system?

SVN revision 13 from Google Code
Mac OS 10.5.4
Flex Builder 3
Air 1.1


Please provide any additional information below.
===============================
Here is my own trace of the execution:
===============================
init in mxml creating new Person
AR#constructor : Person
AR#constructor : defaultConnectionAlias = main
anonymous function assigned to init property is registerig a connection to 
main.db
DB#registerConnectionAlias : fileNameOrObject = main.db
DB#registerConnectionAlias : alias = main
DB#getConnection : alias = main, isSync = true
DB#getConnection : key = main - sync
DB#getConnection : cache = [object Object]
DB#getConnection : aliases = [object Object]
DB#getConnection : alias = main
DB#getConnection : aliases[alias] is File ? false
DB#getConnection : opening synchronous connection to main.db
DB#getConnection : caching connection with key : main - sync
AR#constructor : should have created connection synchronously ? true
AR#getDBProperties : tableName = people
AR#getSchema : tableName = null, updateTable = false
AR#getSchema : tableName = null
AR#getSchema : tableName = people
AR#getSchema : tableName in tableSchemaCache ? false
AR#getSchema : connection ? [object SQLConnection]
DB#getSchema : conn = [object SQLConnection]
DB#getSchema : schemas = [object Dictionary]
DB#getSchema : conn in schemas ? false
DB#getSchema : loading schema conn.connected = true
onSchemaStatus : e.type = No schema objects in database 'main' were found.
DB#getSchema : conn.getSchemaResult() = null
DB#getSchema : returning null
===============================
===============================

Original issue reported on code.google.com by [email protected] on 24 Sep 2008 at 10:41

New schema not generating

What steps will reproduce the problem?
1. checkout code.
2. clear your sqlite db?
3. try running Test

What is the expected output? What do you see instead?
Expecting Table to be created and app to start.

Seeing:
SQLError: 'Error #3115: SQL Error.', details:'No schema objects in database 
'main' were found.', 
operation:'schema'
    at flash.data::SQLConnection/internalLoadSchema()
    at flash.data::SQLConnection/loadSchema()
    at flight.db::DB$/getSchema()[/Users/seth/Flex/air-activerecorrd/src/flight/db/DB.as:62]
    at flight.db.activeRecord::TableCreator$/updateTable()[/Users/seth/Flex/air-
activerecorrd/src/flight/db/activeRecord/TableCreator.as:57]
    at Test/init()[/Users/seth/Flex/ActiveRecord/src/Test.mxml:16]

What version of the product are you using? On what operating system?
revision 12, OSX 10.5

Please provide any additional information below.
looking forward to testing again :)

Original issue reported on code.google.com by [email protected] on 16 May 2008 at 9:01

Integrate with Prana framework

It's not an issue but en enhancement.

I could be great to have AIR Active Record integrated with Prana Framework.
IoC enhance code quality.
Having database settings in an xml file is an exemple of what can bring Prana.



Original issue reported on code.google.com by [email protected] on 20 Oct 2008 at 7:11

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.