and wrap all the gets/sets on _taggableEntities in synchronized(_taggableEntities) calls or switch that to a ConcurrentHashMap
ms On Oct 19, 2012, at 3:53 PM, James Cicenia < email@hidden> wrote: Looks like:
public static EOEntity registerTaggable(EOEntity entity, String tagsRelationshipName) { EOEntity tagEntity = entity.model().modelGroup().entityNamed(ERTag.ENTITY_NAME); if (tagEntity == null) { throw new IllegalArgumentException("There is no entity named '" + ERTag.ENTITY_NAME + "' in this model group."); } ======>>> return ERTaggableEntity.registerTaggable(entity, tagsRelationshipName, tagEntity, null); }
looks like that null is the culprit.
which calls:
public static EOEntity registerTaggable(EOEntity entity, String tagsRelationshipName, EOEntity tagEntity, Class<? extends ERTaggableEntity<?>> taggableEntity) {
which contains:
if (taggableEntity != null) { ERTaggableEntity.setTaggableEntityForEntityNamed(taggableEntity, entity.name()); }
Advice?
James
On Oct 19, 2012, at 1:32 PM, Mike Schrag < email@hidden> wrote: I'm guessing somehow your taggable entity isn't getting registered … I would put some debug into registerTaggable to see if anything calls that for your entity, and if not, probably taggableEntity() should internally call setTaggableEntity in the if-block where it lazily makes an entity so you cache the one that it creates. If you didn't have an instance registered earlier, that would always make a new one … You should be able to verify where exactly you're getting a new one.
ms On Oct 19, 2012, at 2:17 PM, James Cicenia < email@hidden> wrote: Tracing it through to :
private void addNormalizedTags(NSMutableSet<String> set, Object[] tags) { for (Object objTag : tags) { if (objTag instanceof String) { String strTag = (String) objTag; String normalizedTag = _normalizer.normalize(strTag);
The _normalizer at this point is ALWAYS ERDefaultTagNormalizer
Thanks James
On Oct 16, 2012, at 9:34 AM, Mike Schrag < email@hidden> wrote: add some debug to taggableentity's splitTagNames method and see if it's getting in there … it seems like it should be. you should be able to trace through addTagNamed pretty easily.
did you verify that aTag.name() is actually case-preserved on the way in? maybe something already lowercased it by the time it got there? On Oct 16, 2012, at 10:22 AM, James Cicenia < email@hidden> wrote: Hmmm,
I thought that is what I was doing:
public WOActionResults droppedTagOnCircle(){ theTagCircle.taggable().taggableEntity().setNormalizer(new TOSTagNormalizer()); theTagCircle.taggable().addTagNamed(aTag.name()); theTagCircle.editingContext().saveChanges();
return null; }
My custom normalizer didn't seem to get called.
Regards James
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
|