You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by ta...@apache.org on 2005/11/26 06:08:05 UTC
svn commit: r349078 -
/portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java
Author: taylor
Date: Fri Nov 25 21:08:02 2005
New Revision: 349078
URL: http://svn.apache.org/viewcvs?rev=349078&view=rev
Log:
might need to revive the SQL query, just putting in a reminder here
It appears that the User Manager does NOT update the PREFS_NODE_PROPERTY_KEY table
Actually, its the preference impl that fails, which User Manager calls
This has broken the lookupPreference call on the PersistenceBrokerPreferencesProvider, which uses
OJB to do the lookup, and the OJB mapping REQUIRES using the PREFS_NODE_PROPERTY_KEY table in the lookup
even though the prefs API does not write to the PREFS_NODE_PROPERTY_KEY table
Thus...I am NOT finding user info attributes stored by the prefs api (and the user manager)
DLS: could you please review this.
Im really not sure what the PREFS_NODE_PROPERTY_KEY is used for, but currently its very broken
Modified:
portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java
Modified: portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java?rev=349078&r1=349077&r2=349078&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java (original)
+++ portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java Fri Nov 25 21:08:02 2005
@@ -344,7 +344,8 @@
// "FROM `prefs_node` p, prefs_property_key k, prefs_property_value v " +
// "WHERE p.NODE_NAME = 'userinfo' and v.node_id = p.node_id " +
// "AND v.property_key_id = k.property_key_id " +
-// "AND k.property_name = '";
+// "AND k.property_name = ? " +
+// "AND v.text_value = ?"
Criteria c = new Criteria();
if (nodeName != null)
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
Re: svn commit: r349078 - /portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java
Posted by David Le Strat <dl...@yahoo.com>.
Yep, that's exactly what I am working on.
Regards,
David.
--- David Sean Taylor <da...@bluesunrise.com> wrote:
> David,
>
> No problem with removing it +1
>
> Take a look at the preference's OJB mapping, you'll
> want to drop the mapping
>
> </field-descriptor>
> <collection-descriptor
> name="nodeKeys"
>
>
element-class-ref="org.apache.jetspeed.prefs.om.impl.PropertyKeyImpl"
> auto-retrieve="true"
> auto-delete="false"
> auto-update="true"
> indirection-table="PREFS_NODE_PROPERTY_KEY"
> >
>
> Now that the schema is more simplified, do you think
> we can add the FK
> relationships back in now on PREFS_PROPERTY_VALUE
> and PREFS_PROPERTY_KEY?
>
> <!-- Issue with OJB RC6 when deleting M-N.
> Foreign Key Violation.
> <foreign-key foreignTable="PREFS_NODE">
> <reference foreign="NODE_ID"
> local="NODE_ID"/>
> </foreign-key>
> -->
>
> I mean, surely OJB has evolved past these bugs by
> now.
>
> Thanks
>
>
> David Le Strat wrote:
> > David,
> >
> > I will look into this. The
> PREFS_NODE_PROPERTY_KEY
> > table was initially aimed at forcing data
> integrity
> > with the property name. By this I mean that it's
> aim
> > was to make sure that properties where unique and
> > mapped and defined. That's where the
> PropertyManager
> > came into play. In reality, we don't use it, I
> guess
> > this was an overzealous feature on my part. This
> adds
> > complexity and no one uses it. So I propose that
> we
> > get rid of it.
> >
> > Thoughts, objections?
> >
> > Regards,
> >
> > David Le Strat
> >
> > --- taylor@apache.org wrote:
> >
> >
> >>Author: taylor
> >>Date: Fri Nov 25 21:08:02 2005
> >>New Revision: 349078
> >>
> >>URL:
> >>http://svn.apache.org/viewcvs?rev=349078&view=rev
> >>Log:
> >>might need to revive the SQL query, just putting
> in
> >>a reminder here
> >>
> >>It appears that the User Manager does NOT update
> the
> >>PREFS_NODE_PROPERTY_KEY table
> >>Actually, its the preference impl that fails,
> which
> >>User Manager calls
> >>This has broken the lookupPreference call on the
> >>PersistenceBrokerPreferencesProvider, which uses
> >>OJB to do the lookup, and the OJB mapping REQUIRES
> >>using the PREFS_NODE_PROPERTY_KEY table in the
> >>lookup
> >>even though the prefs API does not write to the
> >>PREFS_NODE_PROPERTY_KEY table
> >>Thus...I am NOT finding user info attributes
> stored
> >>by the prefs api (and the user manager)
> >>
> >>DLS: could you please review this.
> >>Im really not sure what the
> PREFS_NODE_PROPERTY_KEY
> >>is used for, but currently its very broken
> >>
> >>Modified:
> >>
> >>
> >
> >
>
portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java
> >
> >>Modified:
> >>
> >
> >
>
portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java
> >
> >>URL:
> >>
> >
> >
>
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java?rev=349078&r1=349077&r2=349078&view=diff
> >
> >
>
==============================================================================
> >
> >>---
> >>
> >
> >
>
portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java
> >
> >>(original)
> >>+++
> >>
> >
> >
>
portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java
> >
> >>Fri Nov 25 21:08:02 2005
> >>@@ -344,7 +344,8 @@
> >> // "FROM `prefs_node` p,
> >>prefs_property_key k, prefs_property_value v " +
> >> // "WHERE p.NODE_NAME = 'userinfo' and
> >>v.node_id = p.node_id " +
> >> // "AND v.property_key_id =
> >>k.property_key_id " +
> >>-// "AND k.property_name = '";
> >>+// "AND k.property_name = ? " +
> >>+// "AND v.text_value = ?"
> >>
> >> Criteria c = new Criteria();
> >> if (nodeName != null)
> >>
> >>
> >>
> >>
> >
> >
>
---------------------------------------------------------------------
> >
> >>To unsubscribe, e-mail:
> >>jetspeed-dev-unsubscribe@portals.apache.org
> >>For additional commands, e-mail:
> >>jetspeed-dev-help@portals.apache.org
> >>
> >>
> >
> >
> >
> > ________________________
> > David Le Strat
> > Blogging @ http://dlsthoughts.blogspot.com
> >
> >
> >
> >
> > __________________________________
> > Yahoo! Mail - PC Magazine Editors' Choice 2005
> > http://mail.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> jetspeed-dev-unsubscribe@portals.apache.org
> > For additional commands, e-mail:
> jetspeed-dev-help@portals.apache.org
> >
> >
> >
>
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> jetspeed-dev-unsubscribe@portals.apache.org
> For additional commands, e-mail:
> jetspeed-dev-help@portals.apache.org
>
>
________________________
David Le Strat
Blogging @ http://dlsthoughts.blogspot.com
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
Re: svn commit: r349078 - /portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java
Posted by David Sean Taylor <da...@bluesunrise.com>.
David,
No problem with removing it +1
Take a look at the preference's OJB mapping, you'll want to drop the mapping
</field-descriptor>
<collection-descriptor
name="nodeKeys"
element-class-ref="org.apache.jetspeed.prefs.om.impl.PropertyKeyImpl"
auto-retrieve="true"
auto-delete="false"
auto-update="true"
indirection-table="PREFS_NODE_PROPERTY_KEY"
>
Now that the schema is more simplified, do you think we can add the FK
relationships back in now on PREFS_PROPERTY_VALUE and PREFS_PROPERTY_KEY?
<!-- Issue with OJB RC6 when deleting M-N. Foreign Key Violation.
<foreign-key foreignTable="PREFS_NODE">
<reference foreign="NODE_ID" local="NODE_ID"/>
</foreign-key>
-->
I mean, surely OJB has evolved past these bugs by now.
Thanks
David Le Strat wrote:
> David,
>
> I will look into this. The PREFS_NODE_PROPERTY_KEY
> table was initially aimed at forcing data integrity
> with the property name. By this I mean that it's aim
> was to make sure that properties where unique and
> mapped and defined. That's where the PropertyManager
> came into play. In reality, we don't use it, I guess
> this was an overzealous feature on my part. This adds
> complexity and no one uses it. So I propose that we
> get rid of it.
>
> Thoughts, objections?
>
> Regards,
>
> David Le Strat
>
> --- taylor@apache.org wrote:
>
>
>>Author: taylor
>>Date: Fri Nov 25 21:08:02 2005
>>New Revision: 349078
>>
>>URL:
>>http://svn.apache.org/viewcvs?rev=349078&view=rev
>>Log:
>>might need to revive the SQL query, just putting in
>>a reminder here
>>
>>It appears that the User Manager does NOT update the
>>PREFS_NODE_PROPERTY_KEY table
>>Actually, its the preference impl that fails, which
>>User Manager calls
>>This has broken the lookupPreference call on the
>>PersistenceBrokerPreferencesProvider, which uses
>>OJB to do the lookup, and the OJB mapping REQUIRES
>>using the PREFS_NODE_PROPERTY_KEY table in the
>>lookup
>>even though the prefs API does not write to the
>>PREFS_NODE_PROPERTY_KEY table
>>Thus...I am NOT finding user info attributes stored
>>by the prefs api (and the user manager)
>>
>>DLS: could you please review this.
>>Im really not sure what the PREFS_NODE_PROPERTY_KEY
>>is used for, but currently its very broken
>>
>>Modified:
>>
>>
>
> portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java
>
>>Modified:
>>
>
> portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java
>
>>URL:
>>
>
> http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java?rev=349078&r1=349077&r2=349078&view=diff
>
> ==============================================================================
>
>>---
>>
>
> portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java
>
>>(original)
>>+++
>>
>
> portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java
>
>>Fri Nov 25 21:08:02 2005
>>@@ -344,7 +344,8 @@
>> // "FROM `prefs_node` p,
>>prefs_property_key k, prefs_property_value v " +
>> // "WHERE p.NODE_NAME = 'userinfo' and
>>v.node_id = p.node_id " +
>> // "AND v.property_key_id =
>>k.property_key_id " +
>>-// "AND k.property_name = '";
>>+// "AND k.property_name = ? " +
>>+// "AND v.text_value = ?"
>>
>> Criteria c = new Criteria();
>> if (nodeName != null)
>>
>>
>>
>>
>
> ---------------------------------------------------------------------
>
>>To unsubscribe, e-mail:
>>jetspeed-dev-unsubscribe@portals.apache.org
>>For additional commands, e-mail:
>>jetspeed-dev-help@portals.apache.org
>>
>>
>
>
>
> ________________________
> David Le Strat
> Blogging @ http://dlsthoughts.blogspot.com
>
>
>
>
> __________________________________
> Yahoo! Mail - PC Magazine Editors' Choice 2005
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
Re: svn commit: r349078 - /portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java
Posted by David Le Strat <dl...@yahoo.com>.
David,
I will look into this. The PREFS_NODE_PROPERTY_KEY
table was initially aimed at forcing data integrity
with the property name. By this I mean that it's aim
was to make sure that properties where unique and
mapped and defined. That's where the PropertyManager
came into play. In reality, we don't use it, I guess
this was an overzealous feature on my part. This adds
complexity and no one uses it. So I propose that we
get rid of it.
Thoughts, objections?
Regards,
David Le Strat
--- taylor@apache.org wrote:
> Author: taylor
> Date: Fri Nov 25 21:08:02 2005
> New Revision: 349078
>
> URL:
> http://svn.apache.org/viewcvs?rev=349078&view=rev
> Log:
> might need to revive the SQL query, just putting in
> a reminder here
>
> It appears that the User Manager does NOT update the
> PREFS_NODE_PROPERTY_KEY table
> Actually, its the preference impl that fails, which
> User Manager calls
> This has broken the lookupPreference call on the
> PersistenceBrokerPreferencesProvider, which uses
> OJB to do the lookup, and the OJB mapping REQUIRES
> using the PREFS_NODE_PROPERTY_KEY table in the
> lookup
> even though the prefs API does not write to the
> PREFS_NODE_PROPERTY_KEY table
> Thus...I am NOT finding user info attributes stored
> by the prefs api (and the user manager)
>
> DLS: could you please review this.
> Im really not sure what the PREFS_NODE_PROPERTY_KEY
> is used for, but currently its very broken
>
> Modified:
>
>
portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java
>
> Modified:
>
portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java
> URL:
>
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java?rev=349078&r1=349077&r2=349078&view=diff
>
==============================================================================
> ---
>
portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java
> (original)
> +++
>
portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java
> Fri Nov 25 21:08:02 2005
> @@ -344,7 +344,8 @@
> // "FROM `prefs_node` p,
> prefs_property_key k, prefs_property_value v " +
> // "WHERE p.NODE_NAME = 'userinfo' and
> v.node_id = p.node_id " +
> // "AND v.property_key_id =
> k.property_key_id " +
> -// "AND k.property_name = '";
> +// "AND k.property_name = ? " +
> +// "AND v.text_value = ?"
>
> Criteria c = new Criteria();
> if (nodeName != null)
>
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> jetspeed-dev-unsubscribe@portals.apache.org
> For additional commands, e-mail:
> jetspeed-dev-help@portals.apache.org
>
>
________________________
David Le Strat
Blogging @ http://dlsthoughts.blogspot.com
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
Re: svn commit: r349078 - /portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java
Posted by David Sean Taylor <da...@bluesunrise.com>.
David Le Strat wrote:
> David,
>
> I have completed the changes we discussed. I ran all
> the tests and they all passed successfully. Do we
> have a test covering the scenario you mention below?
> Let me know.
Yup, if Preferences testsuite is passing, then my test case is covered.
In fact, you seem to have updated the test case so that it doesn't need
the Property Manager anymore (testLookupProperty).
Thanks!
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
Re: svn commit: r349078 - /portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java
Posted by David Le Strat <dl...@yahoo.com>.
David,
I have completed the changes we discussed. I ran all
the tests and they all passed successfully. Do we
have a test covering the scenario you mention below?
Let me know.
For more information on the changes made, see:
http://issues.apache.org/jira/browse/JS2-431
The database schema has been changed as a result of
this issue.
Regards,
David Le Strat
--- taylor@apache.org wrote:
> Author: taylor
> Date: Fri Nov 25 21:08:02 2005
> New Revision: 349078
>
> URL:
> http://svn.apache.org/viewcvs?rev=349078&view=rev
> Log:
> might need to revive the SQL query, just putting in
> a reminder here
>
> It appears that the User Manager does NOT update the
> PREFS_NODE_PROPERTY_KEY table
> Actually, its the preference impl that fails, which
> User Manager calls
> This has broken the lookupPreference call on the
> PersistenceBrokerPreferencesProvider, which uses
> OJB to do the lookup, and the OJB mapping REQUIRES
> using the PREFS_NODE_PROPERTY_KEY table in the
> lookup
> even though the prefs API does not write to the
> PREFS_NODE_PROPERTY_KEY table
> Thus...I am NOT finding user info attributes stored
> by the prefs api (and the user manager)
>
> DLS: could you please review this.
> Im really not sure what the PREFS_NODE_PROPERTY_KEY
> is used for, but currently its very broken
>
> Modified:
>
>
portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java
>
> Modified:
>
portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java
> URL:
>
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java?rev=349078&r1=349077&r2=349078&view=diff
>
==============================================================================
> ---
>
portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java
> (original)
> +++
>
portals/jetspeed-2/trunk/components/prefs/src/java/org/apache/jetspeed/prefs/impl/PersistenceBrokerPreferencesProvider.java
> Fri Nov 25 21:08:02 2005
> @@ -344,7 +344,8 @@
> // "FROM `prefs_node` p,
> prefs_property_key k, prefs_property_value v " +
> // "WHERE p.NODE_NAME = 'userinfo' and
> v.node_id = p.node_id " +
> // "AND v.property_key_id =
> k.property_key_id " +
> -// "AND k.property_name = '";
> +// "AND k.property_name = ? " +
> +// "AND v.text_value = ?"
>
> Criteria c = new Criteria();
> if (nodeName != null)
>
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> jetspeed-dev-unsubscribe@portals.apache.org
> For additional commands, e-mail:
> jetspeed-dev-help@portals.apache.org
>
>
________________________
David Le Strat
Blogging @ http://dlsthoughts.blogspot.com
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org