|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
[Bug 677] New: Dynamic relations broken after update to trunkhttp://dev.helma.org/bugs/show_bug.cgi?id=677
Summary: Dynamic relations broken after update to trunk Product: Helma Version: CVS trunk Platform: Other OS/Version: All Status: NEW Severity: blocker Priority: P5 Component: Database Layer AssignedTo: helma-dev@... ReportedBy: interface@... Today I updated helma.jar from a December 2008 version to trunk and noticed that an application which worked with the old version stopped working with the new. The application uses what I call dynamic relations in one of its prototypes, ie. the following settings in type.properties: _parent = parent parent_id parent_type parent = object(HopObject) parent.local.1 = parent_id parent.foreign.1 = $id parent.local.2 = parent_type parent.foreign.2 = $prototype When creating a new instance and adding it to a collection an exception is thrown: var c = new Content; collection.add(c); com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column 'parent_id' cannot be null This means necessary information to setup the object hierarchy is missing. Here is the corresponding stack trace: at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:931) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2934) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1616) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1708) at com.mysql.jdbc.Connection.execSQL(Connection.java:3255) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1293) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1566) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1480) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1465) at helma.objectmodel.db.NodeManager.insertRelationalNode(NodeManager.java:514) at helma.objectmodel.db.NodeManager.insertNode(NodeManager.java:426) at helma.objectmodel.db.Transactor.commit(Transactor.java:339) at helma.framework.core.RequestEvaluator.commitTransaction(RequestEvaluator.java:661) at helma.framework.core.RequestEvaluator.run(RequestEvaluator.java:439) at java.lang.Thread.run(Thread.java:637) -- Configure bugmail: http://dev.helma.org/bugs/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ Helma-dev mailing list Helma-dev@... http://helma.org/mailman/listinfo/helma-dev |
|
|
[Bug 677] Dynamic relations broken after update to trunkhttp://dev.helma.org/bugs/show_bug.cgi?id=677
Hannes Wallnoefer <hannes@...> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hannes@... --- Comment #1 from Hannes Wallnoefer <hannes@...> 2009-09-16 22:57:43 --- > > var c = new Content; > collection.add(c); Do you set c.parent = collection (or whatever the real parent is supposed to be)? And if you do, does it still throw the exception? > com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column > 'parent_id' cannot be null > -- Configure bugmail: http://dev.helma.org/bugs/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ Helma-dev mailing list Helma-dev@... http://helma.org/mailman/listinfo/helma-dev |
|
|
[Bug 677] Dynamic relations broken after update to trunkhttp://dev.helma.org/bugs/show_bug.cgi?id=677
--- Comment #2 from tobi <interface@...> 2009-09-17 10:32:30 --- Implicitly setting the parent fixes the issue. But as this was not necessary in the older Helma version, is it a bug or a feature of the newer one? -- Configure bugmail: http://dev.helma.org/bugs/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ Helma-dev mailing list Helma-dev@... http://helma.org/mailman/listinfo/helma-dev |
|
|
[Bug 677] Dynamic relations broken after update to trunkhttp://dev.helma.org/bugs/show_bug.cgi?id=677
--- Comment #3 from Hannes Wallnoefer <hannes@...> 2009-09-17 10:41:26 --- (Mit Bezug zu comment #2) > Implicitly setting the parent fixes the issue. > > But as this was not necessary in the older Helma version, is it a bug or a > feature of the newer one? Good question. Can you post the type.properties definition of the collection you're adding the Content object to? If that definition is correct, the add() should set the constraint in the child. -- Configure bugmail: http://dev.helma.org/bugs/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ Helma-dev mailing list Helma-dev@... http://helma.org/mailman/listinfo/helma-dev |
|
|
[Bug 677] Dynamic relations broken after update to trunkhttp://dev.helma.org/bugs/show_bug.cgi?id=677
--- Comment #4 from tobi <interface@...> 2009-09-17 10:55:36 --- This is the mapping for the collection: event = collection(Event) event.local.1 = $id event.foreign.1 = parent_id event.local.2 = $prototype event.foreign.2 = parent_type -- Configure bugmail: http://dev.helma.org/bugs/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ Helma-dev mailing list Helma-dev@... http://helma.org/mailman/listinfo/helma-dev |
|
|
[Bug 677] Dynamic relations broken after update to trunkhttp://dev.helma.org/bugs/show_bug.cgi?id=677
Hannes Wallnoefer <hannes@...> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #5 from Hannes Wallnoefer <hannes@...> 2009-09-17 20:43:26 --- I tracked this down to commits 9688 and 9689: http://dev.helma.org/trac/helma/log/helma?rev=9689 >From there, a link to the mailing list: http://dev.helma.org/trac/helma/log/helma?rev=9689 but the interesting stuff in in the IRC log: http://helma.zumbrunn.com/hopbot/2009-04-28 On IRC I said this: [15:23] <hannesw> it should work now. the only caveat is that you probably have to also set the reverse reference [15:23] <hannesw> i.e. parent.add(child); child.parent = parent; I don't know why this is the case, but I'll look into it. -- Configure bugmail: http://dev.helma.org/bugs/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ Helma-dev mailing list Helma-dev@... http://helma.org/mailman/listinfo/helma-dev |
|
|
[Bug 677] Dynamic relations broken after update to trunkhttp://dev.helma.org/bugs/show_bug.cgi?id=677
Hannes Wallnoefer <hannes@...> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|helma-dev@... |hannes@... --- Comment #6 from Hannes Wallnoefer <hannes@...> 2009-09-18 14:13:07 --- Created an attachment (id=120) --> (http://dev.helma.org/bugs/attachment.cgi?id=120) possible patch -- Configure bugmail: http://dev.helma.org/bugs/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ Helma-dev mailing list Helma-dev@... http://helma.org/mailman/listinfo/helma-dev |
| Free embeddable forum powered by Nabble | Forum Help |