I'm using a TransactionEventHandler to generate a UID for entities (to
avoid using graph id) but doing so in the transaction has its drawbacks.
For one, if you're using @Transactional on a method the UID property value
is not accessible within said method. I'd rather not start dropping txn
boilerplate code into my classes ...anyone have an alternative approach?
can you raise a JIRA issue for that ?
In general I think it would be sensible to have a callback mechanism at "save()" instead of relying on the lower-level tx handlers of Neo4j.
> I'm using a TransactionEventHandler to generate a UID for entities (to avoid using graph id) but doing so in the transaction has its drawbacks. For one, if you're using @Transactional on a method the UID property value is not accessible within said method. I'd rather not start dropping txn boilerplate code into my classes ...anyone have an alternative approach?
What would you say to an even more direct approach to satisfying this use
case. Perhaps an annotation to indicate a) unique key must be generated and
b) implementation of generator class for said key?
> can you raise a JIRA issue for that ?
> In general I think it would be sensible to have a callback mechanism at
> "save()" instead of relying on the lower-level tx handlers of Neo4j.
> Michael
> Am 18.08.2012 um 00:06 schrieb Stacy Tyler Young:
> > I'm using a TransactionEventHandler to generate a UID for entities (to
> avoid using graph id) but doing so in the transaction has its drawbacks.
> For one, if you're using @Transactional on a method the UID property value
> is not accessible within said method. I'd rather not start dropping txn
> boilerplate code into my classes ...anyone have an alternative approach?
> What would you say to an even more direct approach to satisfying this use
> case. Perhaps an annotation to indicate a) unique key must be generated and
> b) implementation of generator class for said key?
> Stacy
> On Sat, Aug 18, 2012 at 3:16 AM, Michael Hunger <
> michael.hun...@neotechnology.com> wrote:
>> Stacy,
>> can you raise a JIRA issue for that ?
>> In general I think it would be sensible to have a callback mechanism at
>> "save()" instead of relying on the lower-level tx handlers of Neo4j.
>> Michael
>> Am 18.08.2012 um 00:06 schrieb Stacy Tyler Young:
>> > I'm using a TransactionEventHandler to generate a UID for entities (to
>> avoid using graph id) but doing so in the transaction has its drawbacks.
>> For one, if you're using @Transactional on a method the UID property value
>> is not accessible within said method. I'd rather not start dropping txn
>> boilerplate code into my classes ...anyone have an alternative approach?
> What would you say to an even more direct approach to satisfying this use case. Perhaps an annotation to indicate a) unique key must be generated and b) implementation of generator class for said key?
> Stacy
> On Sat, Aug 18, 2012 at 3:16 AM, Michael Hunger <michael.hun...@neotechnology.com> wrote:
> Stacy,
> can you raise a JIRA issue for that ?
> In general I think it would be sensible to have a callback mechanism at "save()" instead of relying on the lower-level tx handlers of Neo4j.
> Michael
> Am 18.08.2012 um 00:06 schrieb Stacy Tyler Young:
> > I'm using a TransactionEventHandler to generate a UID for entities (to avoid using graph id) but doing so in the transaction has its drawbacks. For one, if you're using @Transactional on a method the UID property value is not accessible within said method. I'd rather not start dropping txn boilerplate code into my classes ...anyone have an alternative approach?