question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make Transaction class name configurable or namespace it

See original GitHub issue

I started using Continuum for our project and had a lot of problems just starting. Turns out that we had model called Transaction and it clashed with Continuum’s own Transaction model.

It would be nice to be able to have configuration option to control name of this class (and database table).

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:3
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
wodowcommented, May 13, 2016

This is working for me so far (does not use a user class), slightly simplified:

class ContinuumTransaction(Base, sqlalchemy_continuum.transaction.TransactionBase):

    __tablename__ = 'continuum_transaction'

    id = Column(BigInteger, primary_key=True, autoincrement=True)
    remote_addr = Column(String(50))

make_versioned(
    user_cls=None,
    manager=sqlalchemy_continuum.VersioningManager(
        transaction_cls=ContinuumTransaction,
    )
)
1reaction
oinopioncommented, Jul 8, 2015

Name is the only thing I want to change, and that’s only because Transaction is something that already existed in my app. I think it’s a good API design to allow users to easily change names that are not namespaced.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I prevent the error "the class name or namespace ...
The namespace statement indicates "I am under this directory" (well, namespace) The use statement indicates: load this class (= a file)
Read more >
ServiceBehaviorAttribute Class (System.ServiceModel)
The Name and Namespace properties control the name and namespace for the WSDL expression of the service element. The ReleaseServiceInstanceOnTransactionComplete ...
Read more >
How to choose a good namespace name? (Linguistically)
The name chosen for a namespace should indicate the functionality made available by types in the namespace. For example, the System.Net.
Read more >
16. Transaction Management - Spring
It can work with JTA transactions or local transactions using JDBC, JPA, Hibernate or JDO by simply adjusting the configuration files. You can...
Read more >
Package Options | Defining and Using Classes
Package Mapping · From the Management Portal home page, go to the Namespaces page (System Administration > Configuration > System Configuration > Namespaces)....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found