I am creating a simple web app using groovy-grails and angular JS. I have 4 domain objects (Developer, Tester, Programmer) that all extend Person. In my bootstrap.groovy file, I have created new Developers, Testers, and Programmers, but when I run my app, it doesn't populate the table with whats in the Bootstrap.Groovy file. Whenever I take (extends Person) off of the class header, and add String firstName, then it finds the name of the Developer, Tester and Programmer. I also tried extending an abstract Person class (not a domain object), and that failed as well. See Below:
//domain object
class Person{
int id;
String firstName;
String lastName;
}
//domain object, non working copy
class Developer extends Person{
}
//domain object, working copy
class Developer{
int id;
String firstName;
String lastName;
}
//Boostrap.groovy
new Developer(id: 2, firstName: 'Foo', lastName: 'Ninja');
Thanks, Butler_Alfred