Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about tableless models #351

Closed
jkeczan opened this issue Aug 28, 2014 · 3 comments
Closed

Question about tableless models #351

jkeczan opened this issue Aug 28, 2014 · 3 comments
Labels
Milestone

Comments

@jkeczan
Copy link

jkeczan commented Aug 28, 2014

I have this model:

<cfcomponent extends="Model">
    <cffunction name="init" >
        <cfset table(false) />
    </cffunction>

</cfcomponent>

The error I am getting is "Cannot connect to datasource". I do not have a datasource setup so I understand the error. Question I have is should a tableless model have a datasource dependency since it doesn't use the datasource?

@perdjurner
Copy link
Contributor

Sounds like a bug.

I think CFWheels checks on start-up for the datasource, before it even knows if you're only using tableless models or not. We should probably change that to only connect to the datasource when a model connected to a table is requested.

Does it work fine if you set up a datasource?

@perdjurner perdjurner added the bug label Aug 28, 2014
@jkeczan
Copy link
Author

jkeczan commented Aug 28, 2014

Yea, everything works just fine with a datasource.

@scahyono
Copy link
Contributor

scahyono commented Sep 8, 2014

This issue is fixed on master branch and back-ported to 1.3 branch.

@scahyono scahyono closed this as completed Sep 8, 2014
@perdjurner perdjurner added this to the 1.3.2 milestone Sep 8, 2014
scahyono added a commit that referenced this issue Sep 8, 2014
scahyono added a commit that referenced this issue Sep 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants