Git Product home page Git Product logo

grails-dynamic-domain-class-plugin's People

grails-dynamic-domain-class-plugin's Issues

NullPointerException when acces to demo page

What steps will reproduce the problem?

1. grails install-plugin dynamic-domain-class
2. grails install-ddc-demo
3. grails run-app
4. in browser when I try to create new domain by pressing the button "Create 
domain class(es)" errors thrown:

"...Caused by NullPointerException: null
->> 122 | enhanceDomainClass in DynamicDomainService.groovy"

I'm using plugin version 0.3 con grails 2.0.4 in Windows 7.

I think that problem is in the version of grails that is 2.0.4.

Thanks.


Original issue reported on code.google.com by [email protected] on 6 Jul 2012 at 8:18

Plugin "breaks" auto reload of controllers in Grails

What steps will reproduce the problem?
1. (optional; you can use an existing project) Create a new Grails app and add 
a single domain with a single field. Generate all other relevant codes (e.g. 
controller & views).
2. Install the plugin and the demo.
3. On your other controllers outside of the plugin, place any new code... say, 
a simple "println" statement on any action.
4. Save the controller.

What is the expected output? What do you see instead?
Expected: If you change your controller codes and save, the changes should 
reflect immediately without restarting the application.

However, I was able to repeat this problem with a new project... Once the 
plugin gets installed, no matter how small the change to an action's/function's 
code (like a println), the app has to be restarted for the changes to take 
effect.

What version of the product are you using? On what operating system?
Grails: 1.3.7
STS: 2.7.2
OS: Win7

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 6 Oct 2011 at 9:02

Doesn't work with Multi-Tenant plugin.

What steps will reproduce the problem?
1. Install dynamic-domain-class plugin in a newly created project.
2. Install multi-tenant-core plugin.
3. Try loading a class dynamically.

What is the expected output? What do you see instead?
It should load the class but gives error.

What version of the product are you using? On what operating system?
Grails-1.3.7, multi-tenant-core-1.0.3, dynamic-domain-class-0.2.1, O.S-Windows-7

Please provide any additional information below.

Below is the piece of code where exception occurs. It's in 
dynamicDomainService->updateSessionFactory(ctx) method.

['entityPersisters', 'collectionPersisters', 'identifierGenerators', 
'namedQueries', 'namedSqlQueries', 'sqlResultSetMappings', 'imports', 
'collectionRolesByEntityParticipant', 'classMetadata', 
'collectionMetadata'].each { fieldName ->
            def field = ReflectionUtils.findField(ctx.sessionFactory.getClass(), fieldName)
            field.accessible = true
            field.set ctx.sessionFactory, new HashMap(field.get(newSessionFactory))
        }

I also have found a solution and had to change the code. But, please make it 
dynamic so that in newer version it doesn't come up. Below is the resolved code:

['entityPersisters', 'collectionPersisters', 'identifierGenerators', 
'namedQueries', 'namedSqlQueries', 'sqlResultSetMappings', 'imports', 
'collectionRolesByEntityParticipant', 'classMetadata', 
'collectionMetadata'].each { fieldName ->
            def field = ReflectionUtils.findField(ctx.sessionFactory.wrapped.getClass(), fieldName)
            field.accessible = true
            field.set ctx.sessionFactory.wrapped, new HashMap(field.get(newSessionFactory))
        }

Original issue reported on code.google.com by [email protected] on 6 May 2012 at 4:10

plugin artificially requires 1.3.5+

The plugin was generated with 1.3.5 so that's what is specified in the minimum 
required Grails version, but I'm sure it'll work in any version of 1.3 and most 
likely also in any version of 1.2

Original issue reported on code.google.com by [email protected] on 20 Nov 2010 at 2:26

Plugin does not support belongsTo property

What steps will reproduce the problem?
1. Run demo.gsp
2. Add a belongsTo association to the Book class (e.g. static belongsTo = 
[author: Author])
3. Generate the dynamic classes

What is the expected output? What do you see instead?
Expected: Classes would be generated
Actual: An error similar to this is displayed:

Apparent variable 'Author' was found in a static scope but doesn't refer to a 
local variable, static field or class. Possible causes:
You attempted to reference a variable in the binding or an instance variable 
from a static context.
You misspelled a classname or statically imported field. Please check the 
spelling.
You attempted to use a method 'Author' but left out brackets in a place not 
allowed by the grammar.


> What we found so far is that this is somewhat cyclic in nature... meaning, 
Book is looking for the Author class while the Author class is looking for the 
Book class. 


What version of the product are you using? On what operating system?
- Win7
- Grails 1.3.7

Please provide any additional information below.
-

Original issue reported on code.google.com by [email protected] on 13 Dec 2011 at 10:29

Broken on Grails 2.0, Error 500: Internal Server Error


Class
groovy.lang.MissingMethodException
Message
No signature of method: static com.foo.testapp.author.Author.list() is 
applicable for argument types: 
(org.codehaus.groovy.grails.web.servlet.mvc.GrailsParameterMap) values: 
[[dc:com.foo.testapp.author.Author, action:list, ...]] Possible solutions: 
is(java.lang.Object), wait(), find(), wait(long), with(groovy.lang.Closure), 
use([Ljava.lang.Object;)
Around line 36 of 
grails-app\controllers\org\grails\dynamicdomain\DdcController.groovy
33: def list = {
34:     def domainClass = grailsApplication.getDomainClass(params.dc)
35:     params.max = Math.min(params.max ? params.int('max') : 10, 100)
36:     [domainInstanceList: domainClass.clazz.list(params), 
37:     domainInstanceTotal: domainClass.clazz.count(),
38:     domainClass: domainClass]
39: }
Trace
    Line | Method
->>   36 | doCall    in DdcController.groovy
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   1110 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    603 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    722 | run       in java.lang.Thread

Original issue reported on code.google.com by [email protected] on 11 Sep 2012 at 3:45

plugin replaces index.gsp and ships with DdcController.groovy (security risk)

The _install script renames the current index.gsp and replaces it with one that 
has the UI to create domain classes dynamically. This is cool for a demo, but 
it only makes sense if you haven't edited your index.gsp yet. Most applications 
will have customized it heavily.

Instead I'd suggest a new script that users can run after install which creates 
a new GSP (with a different name that they choose) and also copies 
DdcController.groovy to the project's grails-app/controllers directory instead 
of being in the plugins's controllers directory. I think most users don't want 
DdcController.groovy - it's good mostly for a demo.

DdcController.groovy is actually a significant security risk since it's 
auto-mapped to the /appname/ddc URL and unless it's protected with security 
will allow any user to create new domain classes.

Original issue reported on code.google.com by [email protected] on 20 Nov 2010 at 2:38

No Edit link generated when using id name mapping

What steps will reproduce the problem?
1. Choose a simple table with a not-null String as its ID:
CREATE TABLE WEATHER_STATES
(
   WEATHER_STATE varchar2(2) NOT NULL,
   WEATHER_STATE_DESC varchar2(50)
);

INSERT INTO WEATHER_STATES (WEATHER_STATE,WEATHER_STATE_DESC) VALUES 
('CL','Cloudy');
INSERT INTO WEATHER_STATES (WEATHER_STATE,WEATHER_STATE_DESC) VALUES 
('CO','Cold');
INSERT INTO WEATHER_STATES (WEATHER_STATE,WEATHER_STATE_DESC) VALUES 
('MC','Mostly Cloudy');
INSERT INTO WEATHER_STATES (WEATHER_STATE,WEATHER_STATE_DESC) VALUES 
('OV','Overcast');
INSERT INTO WEATHER_STATES (WEATHER_STATE,WEATHER_STATE_DESC) VALUES 
('PC','Partly Cloudy');
INSERT INTO WEATHER_STATES (WEATHER_STATE,WEATHER_STATE_DESC) VALUES 
('RA','Raining');
INSERT INTO WEATHER_STATES (WEATHER_STATE,WEATHER_STATE_DESC) VALUES 
('SN','Snowing');
INSERT INTO WEATHER_STATES (WEATHER_STATE,WEATHER_STATE_DESC) VALUES 
('SU','Sunny');

2. Paste in domain class code:
package us.mn.state.dot.mnroad

class WeatherStates {
   String weatherState
   String weatherStateDesc

   static constraints = { 
        weatherState(nullable:false, blank: false) 
   } 
   static mapping = {
      id name:'weatherState'
      version false
   }
}

3. Generate the class and click the controller link.

What is the expected output? 
- A list of weatherStates with links for each weatherState value.
What do you see instead?
A list with a blank ID column.
- See attached weatherStatesList.jpg

What version of the product are you using? On what operating system?
Grails 1.3.5 Windows XP

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 23 Dec 2010 at 7:18

Attachments:

cannot install 0.2.1 version of plugin, says missing index.gsp

What steps will reproduce the problem?
1. grails install-plugin dynamic-domain class

What is the expected output? What do you see instead?
Should see: Plugin installed successfully
instead see:
Executing dynamic-domain-class-0.2.1 plugin post-install script ...
Error installing plugin: Warning: Could not find file 
/home/rvanderwerf/kpi-source/developerprogram/dynamic-domain-form/grails-app/vie
ws/index.gsp to copy.
   [delete] Deleting directory /home/rvanderwerf/.grails/1.3.5/projects/dynamic-domain-form/plugins/dynamic-domain-class-0.2.1

What version of the product are you using? On what operating system?
0.2.1, Ubuntu 10.4 64 bit, Sun JDK 1.6_23, Grails 1.3.5

Please provide any additional information below.
Executing dynamic-domain-class-0.2.1 plugin post-install script ...
Error installing plugin: Warning: Could not find file 
/home/rvanderwerf/kpi-source/developerprogram/dynamic-domain-form/grails-app/vie
ws/index.gsp to copy.
   [delete] Deleting directory /home/rvanderwerf/.grails/1.3.5/projects/dynamic-domain-form/plugins/dynamic-domain-class-0.2.1

Original issue reported on code.google.com by [email protected] on 4 Feb 2011 at 4:54

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.