Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: 1.0.2
-
Component/s: Persistence
-
Labels:None
-
Environment:Grails 1.0.2 Postgres 8.2.5 postgresql-8.3-603.jdbc4.jar jdbc drivers java 1.6 Mac 10.5
Description
Have the following domain:
class Parent
{ String name static hasMany = [children:Child] }class Child
{ static belongsTo = [Parent] Parent parent }class BigChild
extends Child
{
String extra
}
}
Produces a table named parent and a table named child. Because of the inheritence of BigChild, the child table has an extra column 'big_child_parent_id' which causes a dataintegretyviolation and app explodes.
select * from child ;
id | version | parent_id | class | extra | big_child_parent_id
-----------------------------+--------------------
(0 rows)
This behavior does not occur in 1.0.
I guess this really just affects upgrades. Maybe this was intentional for a perf reason. Did I miss this issue in the upgrade readme?