Giter VIP home page Giter VIP logo

taggable's Issues

Publishing 3.1 compatible version?

Currently, I can't find this plugin on Bintray, only a snapshot from last year on repos.grails.org.
Travis successfully builds this plugin, but fails because of a missing configuration for publishing it.

Are there any publishing plans, so people with grails 3.1 can easily use this plugin?
A new snapshot releas on repos.grails.org would be sufficient. Is someone working on this?

The OpenSpeedMonitor depends on this plugin and people should really be able to get it from somewhere.

Using with Grails 5.2.x -- repo location?

Hello,
I am trying to use the taggable plugin on a 5.2.4 grails app. It looks like this github repo has been updated somewhat recently, but some of the content might be out of sync? Or, I may be missing some obvious things...

The docs say to add
compile "io.github.gpc:taggable:4.0.0"
to the dependencies, but AFAIU that is outdated in recent gradle, and perhaps should be
implementation "io.github.gpc:taggable:4.0.0"
?

Also, the docs seem to suggest the plugin is available in the standard grails plugin site. I can no longer find it there, and get an error suggesting that the 'stanard' repos don't know about it.

buildscript {
    repositories {
        maven { url "https://plugins.gradle.org/m2/" }
        maven { url "https://repo.grails.org/grails/core" }
    }

Any pointers to overcome my misunderstandings would be most welcome :-)

Invalid tag_link types in case of 'lazy' hibernate proxies

Hi there,
In cases when Hibernate uses 'lazy' loading of domain object it doesn't actually create a full object of the specific type but only a proxy which has different type name than original one. This results in wrong behaviour of taggable.
For example:
Lets say there is an domain object:
class Book {
Author author
}

def book = Book.get(3453)
book.author.addTag("test")

will end up as database call similar to this:

insert into tag_links (actor_id, date_created, tag_id, tag_ref, type) values (null, '2014-05-21 13:27:03', 14, 90, 'author_$$_javassist_190')

book.author is in fact javassist hibernate proxy not a real Author object. So if there is a subsequent call:

def author = Author.get(567567)
author.getTagLinks()

it will do:
select ... tag_links this_ inner join tags tag2_ on this_.tag_id=tag2_.id where this_.tag_id=14 and this_.tag_ref=90 and this_.type='autor' limit 1

and fail to find the tag because the type is obviously different.

One way to fix it - is to change:
GrailsNameUtils.getPropertyName(instance.class) calls in TaggableGrailsPlugin.groovy
onto:
GrailsNameUtils.getPropertyName(Hibernate.getClass(instance)) - Hibernate.getClass() properly resolves class of the object event if it's a proxy.

BR

Support for non-Long ids

TagLink requires domains being tagged to have a Long id.

My project is using a locally modified version of the plugin where I changed tagRef to be a UUID.
If there is any demand - I can create a pull request updating the plugin to generate TagLink from a template, a la Sprint Security Core's s2-quickstart script, that will allow users to change the tagRef type.

Thoughts?

Taggable dependency not working

This issue started happening yesterday and seems to be related to this alert:
https://grails.org/blog/2021-02-12-alerts-regarding-bintray-sunset.html


> Could not resolve all dependencies for configuration ':runtime'.
   > Could not resolve org.grails.plugins:taggable:2.1.0-SNAPSHOT.
     Required by:
         chartertools:chartertools:4.1.0
      > Could not resolve org.grails.plugins:taggable:2.1.0-SNAPSHOT.
         > Unable to load Maven meta-data from http://dl.bintray.com/stefanogualdi/plugins/org/grails/plugins/taggable/2.1.0-SNAPSHOT/maven-metadata.xml.
            > Could not GET 'http://dl.bintray.com/stefanogualdi/plugins/org/grails/plugins/taggable/2.1.0-SNAPSHOT/maven-metadata.xml'. Received status code 403 from server: Forbidden
      > Could not resolve org.grails.plugins:taggable:2.1.0-SNAPSHOT.
         > Unable to load Maven meta-data from http://dl.bintray.com/agorapulse/libs/org/grails/plugins/taggable/2.1.0-SNAPSHOT/maven-metadata.xml.
            > Could not GET 'http://dl.bintray.com/agorapulse/libs/org/grails/plugins/taggable/2.1.0-SNAPSHOT/maven-metadata.xml'. Received status code 403 from server: Forbidden

We use the Taggable plugin in two different Grails projects (also different versionS).
This error occurs when running Grails version 3.3.8 and JDK 8.

Do we need to create a local dependency of this plugin?
If so, which version of the code should we use? The 2.1.0 version is nowhere to be found on github.

Any suggestions would be greatly appreciated since this is a critical plugin for this project.

Upgrade to Grails 3.1.1

I am migrating 2.4.4 project to 3.1.1 and as discussed in 9506 , @graemerocher does this plugin needs to be compiled with 3.1.1 against GORM 5, so that there's no conflict?

Also documentation needs to be updated for its dependency to - compile "org.grails.plugins:taggable:2.0.0-SNAPSHOT".

change max length of tag name to 191 chars to support utf8mb4

I need to change my database's charset to utf8mb4. In MySQL this means that the maximum of length of any indexed string columns is reduced from 255 to 191 chars. The Tag.name property is indexed, so as things currently stand it can't be used with the utf8mb4 charset.

In order to support this charset I'm proposing to reduce the maximum length of this field to 191 chars. Although in theory this could be a breaking change for some users, in practice I think the likelihood of any user actually having tags that are named with more than 191 chars is an acceptable risk.

All that's required is adding a maxSize: 191 constraint to the name field. Some Info about utf8mb4 is available here: http://mathiasbynens.be/notes/mysql-utf8mb4

Trait not being applied to Java Domain classes

I have my domain classes as Java/JPA object. In Grails 2.5.2, the taggable plugin would correctly apply the trait to them. In 3.0.10 with this version of the plugin, I get compile errors that my domain objects that implement Taggable need to implement the methods defined in the trait.

I am not sure if this is a taggable code issue or grails 3.0.10? I believe the taggable code may need a trait interceptor?

Incompatible with Grails 4

Due to removal of deprecated methods on the DefaultGrailsDomainClass, the plugin is broken on Grails 4.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.